/**
 * @author erond
 */

package master;

import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;
import java.util.NoSuchElementException;
import java.util.Observable;
import java.util.Observer;
import java.util.StringTokenizer;
import java.util.Vector;

import javax.swing.BorderFactory;

import javax.swing.DefaultComboBoxModel;
import javax.swing.GroupLayout;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSeparator;
import javax.swing.JSlider;
import javax.swing.JTabbedPane;
import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.ListModel;
import javax.swing.SwingConstants;
import javax.swing.WindowConstants;
import javax.swing.border.BevelBorder;
import javax.swing.border.SoftBevelBorder;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.table.AbstractTableModel;
import javax.swing.SwingUtilities;

import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
import org.fife.ui.rsyntaxtextarea.SyntaxConstants;

import master.BeforeGatewayLink.BeforeGatewayLink_ClientOutput;
import master.BeforeGatewayLink.BeforeGatewayLink_ServerInput;
import master.AfterGatewayLink.AfterGatewayLink_ClientOutput;
import master.AfterGatewayLink.AfterGatewayLink_ServerInput;
import commonUtility.JPanelImage;
import commonUtility.LineUtility;


/**
 * This code was edited or generated using CloudGarden's Jigloo
 * SWT/Swing GUI Builder, which is free for non-commercial
 * use. If Jigloo is being used commercially (ie, by a corporation,
 * company or business for any purpose whatever) then you
 * should purchase a license for each developer using Jigloo.
 * Please visit www.cloudgarden.com for details.
 * Use of Jigloo implies acceptance of these licensing terms.
 * A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
 * THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
 * LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
 */

/**
 * Interfaccia per il monitoraggio e gestione dell'attività interna del Master
 */
public class MasterMonitor extends javax.swing.JFrame implements Observer{

	private static final long serialVersionUID = 1L;
	private final static String aCapo = "\n";

	{
		//Set Look & Feel
		try {
			javax.swing.UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
		} catch(Exception e) {
			e.printStackTrace();
		}

		setDefaultCloseOperation(EXIT_ON_CLOSE);
	}

	private JLabel jLabel30;
	private JTabbedPane jTabbedPane1;
	private JPanel jAfterGatewayLink;
	private JPanel jPanel1;
	private JTextArea jConsoleEventiTextArea;
	private ArrowLabel jLabel27;
	private ArrowLabel jLabel26;
	private ArrowLabel jLabel25;
	private ArrowLabel jLabel24;
	private JLabel jLabel_MergeXml;
	private JLabel jLabel_GotAfterTransferJob;
	private JLabel jLabel_GotBeforeTransferJob;
	private ArrowLabel jLabel23;
	private ArrowLabel jLabel22;
	private ArrowLabel jLabel21;
	private ArrowLabel jLabel20;
	private JLabel jLabel_DownloadXml;
	private ArrowLabel jLabel12;
	private JLabel jLabel_WaitForSlaveInquirySignal;
	private ArrowLabel jLabel11;
	private JLabel jLabel_InquiryToSlave;
	private ArrowLabel jLabel10;
	private JLabel jLabel_Inquiring;
	private JLabel jLabel_WaitForJobReceived;
	private JLabel jLabel_JobReadyReceivedSignal;
	private JLabel jLabel_JobReadySignal;
	private JLabel jLabel_NoSignalAfter;
	private JLabel jLabel_NoSignalBefore;
	private ArrowLabel jLabel37;
	private ArrowLabel jLabel36;
	private JLabel jLabel_YesSignalAfter;
	private JLabel jLabel_YesSignalBefore;
	private JLabel jLabel_LoadBalancingSignalBefore;
	private JLabel jLabel_LoadBalancingSignalAfter;
	private JPanel jPanel9;
	private JScrollPane jScrollPane9;
	private JTabbedPane jTabbedPane4;
	private JScrollPane jScrollPane8;
	private JTabbedPane jTabbedPane3;
	private JScrollPane jScrollPane7;
	private JTabbedPane jTabbedPane2;
	private JLabel jLabelEmpty;
	private JLabel jLabel35;
	private JSlider jSlider_RssiThresholding;
	private JSlider jSlider_maxPACKET;
	private JSlider jSlider_maxTime;
	private JPanel jPanel8;
	private JTextField jInquirymaxTIME;
	private JLabel jLabel34;
	private JTextField jInquirymaxPACKET;
	private JLabel jLabel33;
	private JTextField jInquiryRSSIThresholding;
	private JLabel jLabel32;
	private JButton jButton_Update;
	private JPanel jPanel7;
	private JLabel jLabel31;
	private JPanelImage jPanelImage_LogoMaster;
	private JPanel jHotSetting;
	private JMenuItem jMenuItem_IL;
	private JMenu jMenu1;
	private JMenuBar jMenuBar1;
	private JButton jButton_Pause;
	private MyConnectionLabel antenna;
	private JLabel jLabel_OkDownloadXmlSignal;
	private JLabel jLabel_InquiryReadySignal;
	private JLabel jLabel_End;
	private ArrowLabel jLabel29;
	private ArrowLabel jLabel28;
	private JLabel jLabel_SendJobToSlave;
	private SemaphoreLabel jLabel_SemaphoreAfter;
	private SemaphoreLabel jLabel_SemaphoreBefore;
	private ArrowLabel jLabel19;
	private ArrowLabel jLabel18;
	private JLabel jLabel_StealAfter;
	private JLabel jLabel_StealBefore;
	private ArrowLabel jLabel17;
	private ArrowLabel jLabel16;
	private JLabel jLabel_After;
	private JLabel jLabel_Before;
	private JLabel jLabel_Slave;
	private ArrowLabel jLabel15;
	private ArrowLabel jLabel14;
	private ArrowLabel jLabel13;
	private JLabel jLabel9;
	private JPanel jRunTimeMasterJob;
	private JLabel afterLink_ServerSocketImage;
	private JLabel afterLink_ClientSocketImage;
	private JLabel beforeLink_ServerSocketImage;
	private JLabel beforeLink_ClientSocketImage;
	private JLabel masterJobConnectionImage;
	private JScrollPane jScrollPane6;
	private JTextArea jConsoleEventiBeforeGatewayLink;
	private JPanel jPanelBeforeGatewayLink;
	private JLabel jLabel7;
	private JSeparator jSeparator2;
	private JScrollPane jScrollPane5;
	private JTextArea jConsoleEventiAfterGatewayLink;
	private JPanel jPanelConsoleEventiAfterGatewayLink;
	private JSeparator jSeparator1;
	private JLabel jLabel5;
	private JLabel jLabel1;
	private JScrollPane jScrollPane4;
	private JPanel jMasterJobConsole;
	private JList jList1;
	private JLabel jLabel4;
	private JPanel jPanel6;
	private JList jList2;
	private JLabel jLabel2;
	private JPanel jPanel5;
	private JPanel jPanel4;
	private JList jList3;
	private JTable jTable3;
	private JLabel jLabel3;
	private JPanel jBeforeGatewayLink;
	private JPanel jMasterJobServer;
	private JPanel jPanel3;
	private JPanel jPanel2;
	private JTable jTable1;
	private JTable jTable2;
	private JLabel jServer_SocketStatus;
	private JLabel jClientSocketStatus;
	private JScrollPane jScrollPane1;
	private JScrollPane jScrollPane2;
	private JScrollPane jScrollPane3;
	private MasterJobTableModel masterJobTableModel = null;
	private BeforeGatewayLinkTableModel beforeLinkTableModel = null;
	private BeforeGatewayLink_ServerInputTableModel beforeLink_ServerInputTableModel = null;
	private BeforeGatewayLink_ClientOutputTableModel beforeLink_ClientOutputTableModel = null;
	private AfterGatewayLinkTableModel afterLinkTableModel = null;
	private AfterGatewayLink_ServerInputTableModel afterLink_ServerInputTableModel = null;
	private AfterGatewayLink_ClientOutputTableModel afterLink_ClientOutputTableModel = null;
	private boolean firstTimeMasterConnectionImage = true;
	private boolean firstTimeBeforeLink_ClientImage = true;
	private boolean firstTimeBeforeLink_ServerImage = true;
	private boolean firstTimeAfterLink_ClientImage = true;
	private boolean firstTimeAfterLink_ServerImage = true;
	private JPanelImage sfondoInquiry = null;
	private Vector<ClientDetected> clientsDetected = null;
	private RSyntaxTextArea jobXml = null;
	private RSyntaxTextArea localXml = null;
	private boolean init=true;
	private boolean firstTime_LocalXml=true;
	private boolean run=false;
	private RSyntaxTextArea beforeXml = null;
	private boolean firstTime_BeforeXml=true;
	private RSyntaxTextArea afterXml = null;
	private boolean firstTime_AfterXml=true;

	/**
	 * @return the afterLinkTableModel
	 */
	public AfterGatewayLinkTableModel getAfterGatewayLinkTableModel() {
		return afterLinkTableModel;
	}

	/**
	 * @param afterLinkTableModel the afterLinkTableModel to set
	 */
	public void setAfterGatewayLinkTableModel(
			AfterGatewayLinkTableModel afterLinkTableModel) {
		this.afterLinkTableModel = afterLinkTableModel;
	}

	/**
	 * @return the afterLink_ServerInputTableModel
	 */
	public AfterGatewayLink_ServerInputTableModel getAfterGatewayLink_ServerInputTableModel() {
		return afterLink_ServerInputTableModel;
	}

	/**
	 * @param afterLinkServerInputTableModel the afterLink_ServerInputTableModel to set
	 */
	public void setAfterGatewayLink_ServerInputTableModel(
			AfterGatewayLink_ServerInputTableModel afterLinkServerInputTableModel) {
		afterLink_ServerInputTableModel = afterLinkServerInputTableModel;
	}

	/**
	 * @return the afterLink_ClientOutputTableModel
	 */
	public AfterGatewayLink_ClientOutputTableModel getAfterGatewayLink_ClientOutputTableModel() {
		return afterLink_ClientOutputTableModel;
	}

	/**
	 * @param afterLinkClientOutputTableModel the afterLink_ClientOutputTableModel to set
	 */
	public void setAfterGatewayLink_ClientOutputTableModel(
			AfterGatewayLink_ClientOutputTableModel afterLinkClientOutputTableModel) {
		afterLink_ClientOutputTableModel = afterLinkClientOutputTableModel;
	}

	public boolean firstTimeMasterJobTableModel = true;
	public boolean firstTimeBeforeGatewayLinkTableModel = true;
	public boolean firstTimeBeforeGatewayLink_ServerInputTableModel = true;
	public boolean firstTimeBeforeGatewayLink_ClientOutputTableModel = true;
	public boolean firstTimeAfterGatewayLinkTableModel = true;
	public boolean firstTimeAfterGatewayLink_ServerInputTableModel = true;
	public boolean firstTimeAfterGatewayLink_ClientOutputTableModel = true;
	private String masterJobConsoleMessage="";
	private String beforeLinkConsoleMessage="";
	private String beforeLink_ClientOutputConsoleMessage="";
	private String beforeLink_ServerInputConsoleMessage="";
	private String afterLinkConsoleMessage="";
	private String afterLink_ClientOutputConsoleMessage="";
	private String afterLink_ServerInputConsoleMessage="";
	/**
	 * @return the afterLinkConsoleMessage
	 */
	public String getAfterGatewayLinkConsoleMessage() {
		return afterLinkConsoleMessage;
	}

	/**
	 * @param afterLinkConsoleMessage the afterLinkConsoleMessage to set
	 */
	public void setAfterGatewayLinkConsoleMessage(String afterLinkConsoleMessage) {
		this.afterLinkConsoleMessage = afterLinkConsoleMessage;
	}

	/**
	 * @return the afterLink_ClientOutputConsoleMessage
	 */
	public String getAfterGatewayLink_ClientOutputConsoleMessage() {
		return afterLink_ClientOutputConsoleMessage;
	}

	/**
	 * @param afterLinkClientOutputConsoleMessage the afterLink_ClientOutputConsoleMessage to set
	 */
	public void setAfterGatewayLink_ClientOutputConsoleMessage(
			String afterLinkClientOutputConsoleMessage) {
		afterLink_ClientOutputConsoleMessage = afterLinkClientOutputConsoleMessage;
	}

	/**
	 * @return the afterLink_ServerInputConsoleMessage
	 */
	public String getAfterGatewayLink_ServerInputConsoleMessage() {
		return afterLink_ServerInputConsoleMessage;
	}

	/**
	 * @param afterLinkServerInputConsoleMessage the afterLink_ServerInputConsoleMessage to set
	 */
	public void setAfterGatewayLink_ServerInputConsoleMessage(
			String afterLinkServerInputConsoleMessage) {
		afterLink_ServerInputConsoleMessage = afterLinkServerInputConsoleMessage;
	}

	public String jList3currentSelection="BeforeGatewayLink";
	public String jList2currentSelection="MasterJobServerThread";
	public String jList1currentSelection="AfterGatewayLink";

	private Master master = null;

	public void setMaster(Master m) {
		if (m==null) System.out.println("Creazione MasterMonitor. ISTANZA DI Master = null!");
		master=m;
	}

	public Master getMaster() {
		return master;
	}

	/**
	 * Creo le variabili che ospiteranno i dati provenienti dai thread del master
	 */
	private MasterJobServer masterJobServerThread = null;
	private BeforeGatewayLink beforeGatewayLinkThread = null;
	private BeforeGatewayLink_ServerInput beforeLink_ServerInput = null;
	private BeforeGatewayLink_ClientOutput beforeLink_ClientOutput = null;
	private AfterGatewayLink afterGatewayLinkThread = null;
	private AfterGatewayLink_ServerInput afterLink_ServerInput = null;
	private AfterGatewayLink_ClientOutput afterLink_ClientOutput = null;
	private JSeparator jSeparator_40;
	private JSeparator jSeparator_50;
	private JLabel jLabel_40;
	private JLabel jLabel_50;
	private JSeparator jSeparator_60;
	private JSeparator jSeparator_70;
	private JLabel jLabel_60;
	private JLabel jLabel_70;
	private JSeparator jSeparator_80;
	private JLabel jLabel_80;
	private JSeparator jSeparator_30;
	private JSeparator jSeparator_90;
	private JLabel jLabel_30;
	private JLabel jLabel_90;


	/**
	 * Auto-generated main method to display this JFrame
	 */
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				MasterMonitor inst = new MasterMonitor("Master Monitor",null, 0, 0, 0);
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}

	public MasterMonitor(String string, Master m, int bootMaxTime, int bootMaxPacket, int bootMaxRssi) {
		super(string);
		setMaster(m);
		initGUI();
		setLocationRelativeTo(null);
		setVisible(true);
	}

	class BeforeGatewayLinkTableModel extends AbstractTableModel {

		private String[] columnNames = {"Attributi", "Valori" }; //Nomi delle colonne
		private Object [][] data; //Matrice di oggetti

		public BeforeGatewayLinkTableModel() {

			data=new Object[8][8];

			if (firstTimeBeforeGatewayLinkTableModel) {
				for(int i=0;i<8;i++) {
					data[i][0]="-";
					data[i][1]="-";
				}
				firstTimeBeforeGatewayLinkTableModel=false;
			} else {
				/**
				 * Popolo il vettore con i campi dati dalla funzione getBeforeGatewayLinkStatus()
				 */
				Object[] tmp = getBeforeGatewayLinkStatus();

				for (int i=0;i<tmp.length;i++) {
					data[i][1]=tmp[i];
				}


				/**
				 * Etichette variabili
				 */
				data[0][0]="Stato";
				data[1][0]="BeforeGatewayLink_ServerInputSocket";
				data[2][0]="Server_serverInputPort";
				data[3][0]="Server_ServerIP";
				data[4][0]="SlaveIP";
				data[5][0]="SlaveDeleteServerPort_before";
				data[6][0]="BeforeGatewayLink_ServerInput";
				data[7][0]="BeforeGatewayLink_ClientOutput";

			}

		}

		/**
		 * 
		 */
		private static final long serialVersionUID = 1L;

		public int getColumnCount() {
			return columnNames.length;
		}

		public int getRowCount() {
			return data.length;
		}

		public String getColumnName(int col) {
			return columnNames[col];
		}

		public Object getValueAt(int row, int col) {
			return data[row][col];
		}


	}//fine BeforeGatewayLinkTableModel

	class BeforeGatewayLink_ServerInputTableModel extends AbstractTableModel {

		private String[] columnNames = {"Attributi", "Valori" }; //Nomi delle colonne
		private Object [][] data; //Matrice di oggetti

		public BeforeGatewayLink_ServerInputTableModel() {

			data=new Object[6][6];

			if (firstTimeBeforeGatewayLink_ServerInputTableModel) {
				for(int i=0;i<6;i++) {
					data[i][0]="-";
					data[i][1]="-";
				}
				firstTimeBeforeGatewayLink_ServerInputTableModel=false;
			} else {
				/**
				 * Popolo il vettore con i campi dati dalla funzione getBeforeGatewayLink_ServerInputStatus()
				 */
				Object[] tmp = getBeforeGatewayLink_ServerInputStatus();

				for (int i=0;i<tmp.length;i++) {
					data[i][1]=tmp[i];
				}


				/**
				 * Etichette variabili
				 */
				data[0][0]="Stato";
				data[1][0]="localGatewayClientSocket";
				data[2][0]="localGatewayServerSocket";
				data[3][0]="lastSignalSend";
				data[4][0]="lastSignalReceived";
				data[5][0]="MasterDeleteClient_BeforeGatewayLink";


			}

		}

		/**
		 * 
		 */
		private static final long serialVersionUID = 3L;

		public int getColumnCount() {
			return columnNames.length;
		}

		public int getRowCount() {
			return data.length;
		}

		public String getColumnName(int col) {
			return columnNames[col];
		}

		public Object getValueAt(int row, int col) {
			return data[row][col];
		}


	}//fine BeforeGatewayLink_ServerInputTableModel

	class BeforeGatewayLink_ClientOutputTableModel extends AbstractTableModel {

		private String[] columnNames = {"Attributi", "Valori" }; //Nomi delle colonne
		private Object [][] data; //Matrice di oggetti

		public BeforeGatewayLink_ClientOutputTableModel() {

			data=new Object[4][4];

			if (firstTimeBeforeGatewayLink_ClientOutputTableModel) {
				for(int i=0;i<4;i++) {
					data[i][0]="-";
					data[i][1]="-";
				}
				firstTimeBeforeGatewayLink_ClientOutputTableModel=false;
			} else {
				/**
				 * Popolo il vettore con i campi dati dalla funzione getBeforeGatewayLink_ClientOutputStatus()
				 */
				Object[] tmp = getBeforeGatewayLink_ClientOutputStatus();

				for (int i=0;i<tmp.length;i++) {
					data[i][1]=tmp[i];
				}


				/**
				 * Etichette variabili
				 */
				data[0][0]="Stato";
				data[1][0]="threadOutputSocket";
				data[2][0]="lastSignalSend";
				data[3][0]="lastSignalReceived";


			}

		}

		/**
		 * 
		 */
		private static final long serialVersionUID = 4L;

		public int getColumnCount() {
			return columnNames.length;
		}

		public int getRowCount() {
			return data.length;
		}

		public String getColumnName(int col) {
			return columnNames[col];
		}

		public Object getValueAt(int row, int col) {
			return data[row][col];
		}


	}//fine BeforeGatewayLink_ClientOutputTableModel


	class AfterGatewayLinkTableModel extends AbstractTableModel {

		private String[] columnNames = {"Attributi", "Valori" }; //Nomi delle colonne
		private Object [][] data; //Matrice di oggetti

		public AfterGatewayLinkTableModel() {

			data=new Object[8][8];

			if (firstTimeAfterGatewayLinkTableModel) {
				for(int i=0;i<8;i++) {
					data[i][0]="-";
					data[i][1]="-";
				}
				firstTimeAfterGatewayLinkTableModel=false;
			} else {
				/**
				 * Popolo il vettore con i campi dati dalla funzione getAfterGatewayLinkStatus()
				 */
				Object[] tmp = getAfterGatewayLinkStatus();

				for (int i=0;i<tmp.length;i++) {
					data[i][1]=tmp[i];
				}


				/**
				 * Etichette variabili
				 */
				data[0][0]="Stato";
				data[1][0]="AfterGatewayLink_ServerInputSocket";
				data[2][0]="Client_serverInputPort";
				data[3][0]="Client_ServerIP";
				data[4][0]="SlaveIP";
				data[5][0]="SlaveDeleteServerPort_after";
				data[6][0]="AfterGatewayLink_ServerInput";
				data[7][0]="AfterGatewayLink_ClientOutput";

			}

		}

		/**
		 * 
		 */
		private static final long serialVersionUID = 8L;

		public int getColumnCount() {
			return columnNames.length;
		}

		public int getRowCount() {
			return data.length;
		}

		public String getColumnName(int col) {
			return columnNames[col];
		}

		public Object getValueAt(int row, int col) {
			return data[row][col];
		}


	}//fine AfterGatewayLinkTableModel

	class AfterGatewayLink_ServerInputTableModel extends AbstractTableModel {

		private String[] columnNames = {"Attributi", "Valori" }; //Nomi delle colonne
		private Object [][] data; //Matrice di oggetti

		public AfterGatewayLink_ServerInputTableModel() {

			data=new Object[6][6];

			if (firstTimeAfterGatewayLink_ServerInputTableModel) {
				for(int i=0;i<6;i++) {
					data[i][0]="-";
					data[i][1]="-";
				}
				firstTimeAfterGatewayLink_ServerInputTableModel=false;
			} else {
				/**
				 * Popolo il vettore con i campi dati dalla funzione getAfterGatewayLink_ServerInputStatus()
				 */
				Object[] tmp = getAfterGatewayLink_ServerInputStatus();

				for (int i=0;i<tmp.length;i++) {
					data[i][1]=tmp[i];
				}


				/**
				 * Etichette variabili
				 */
				data[0][0]="Stato";
				data[1][0]="localGatewayClientSocket";
				data[2][0]="localGatewayServerSocket";
				data[3][0]="lastSignalSend";
				data[4][0]="lastSignalReceived";
				data[5][0]="MasterDeleteClient_AfterGatewayLink";


			}

		}

		/**
		 * 
		 */
		private static final long serialVersionUID = 6L;

		public int getColumnCount() {
			return columnNames.length;
		}

		public int getRowCount() {
			return data.length;
		}

		public String getColumnName(int col) {
			return columnNames[col];
		}

		public Object getValueAt(int row, int col) {
			return data[row][col];
		}


	}//fine AfterGatewayLink_ServerInputTableModel

	class AfterGatewayLink_ClientOutputTableModel extends AbstractTableModel {

		private String[] columnNames = {"Attributi", "Valori" }; //Nomi delle colonne
		private Object [][] data; //Matrice di oggetti

		public AfterGatewayLink_ClientOutputTableModel() {

			data=new Object[4][4];

			if (firstTimeAfterGatewayLink_ClientOutputTableModel) {
				for(int i=0;i<4;i++) {
					data[i][0]="-";
					data[i][1]="-";
				}
				firstTimeAfterGatewayLink_ClientOutputTableModel=false;
			} else {
				/**
				 * Popolo il vettore con i campi dati dalla funzione getAfterGatewayLink_ClientOutputStatus()
				 */
				Object[] tmp = getAfterGatewayLink_ClientOutputStatus();

				for (int i=0;i<tmp.length;i++) {
					data[i][1]=tmp[i];
				}


				/**
				 * Etichette variabili
				 */
				data[0][0]="Stato";
				data[1][0]="threadOutputSocket";
				data[2][0]="lastSignalSend";
				data[3][0]="lastSignalReceived";


			}

		}

		/**
		 * 
		 */
		private static final long serialVersionUID = 5L;

		public int getColumnCount() {
			return columnNames.length;
		}

		public int getRowCount() {
			return data.length;
		}

		public String getColumnName(int col) {
			return columnNames[col];
		}

		public Object getValueAt(int row, int col) {
			return data[row][col];
		}


	}//fine AfterGatewayLink_ClientOutputTableModel


	class MasterJobTableModel extends AbstractTableModel {

		private String[] columnNames = {"Attributi", "Valori" }; //Nomi delle colonne
		private Object [][] data; //Matrice di oggetti

		public MasterJobTableModel() {

			data=new Object[12][12];

			if (firstTimeMasterJobTableModel==true) {
				for(int i=0;i<12;i++) {
					data[i][0]="-";
					data[i][1]="-";
				}
				firstTimeMasterJobTableModel=false;
			} else {
				/**
				 * Popolo il vettore con i campi dati dalla funzione getMasterJobStatus()
				 */
				Object[] tmp = getMasterJobStatus();

				for (int i=0;i<tmp.length;i++) {
					data[i][1]=tmp[i];
				}


				/**
				 * Etichette variabili
				 */
				data[0][0]="Stato";
				data[1][0]="masterJobServerSocket";
				data[2][0]="slaveConnectionSocket";
				data[3][0]="LastSignalSent";
				data[4][0]="LastSignalReceived";
				data[5][0]="beforeGatewayLinkThread";
				data[6][0]="afterGatewayLinkThread";
				data[7][0]="Default file name";
				data[8][0]="beforeLink_ClientOutput";
				data[9][0]="afterLink_ClientOutput";
				data[10][0]="inquiryThread";
				data[11][0]="slaveIP";

			}

		}

		/**
		 * 
		 */
		private static final long serialVersionUID = 2L;

		public int getColumnCount() {
			return columnNames.length;
		}

		public int getRowCount() {
			return data.length;
		}

		public String getColumnName(int col) {
			return columnNames[col];
		}

		public Object getValueAt(int row, int col) {
			return data[row][col];
		}


	}//fine MasterJobTableModel


	/**
	 * Funzione chiamata all'avvio che inizializza l'interfaccia grafica
	 */
	private void initGUI() {
		try {
			GroupLayout thisLayout = new GroupLayout((JComponent)getContentPane());
			getContentPane().setLayout(thisLayout);
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);

			//	UIManager.put("OptionPane.informationIcon",icon);

			{
				jMenuBar1 = new JMenuBar();
				setJMenuBar(getJMenuBar1());
				jMenuBar1.add(getJMenu1());
			}
			{
				jTabbedPane1 = new JTabbedPane();
				jTabbedPane1.addMouseListener(new MouseAdapter() {
					public void mouseClicked(MouseEvent evt) {
						jTabbedPane1MouseClicked(evt);
					}
				});
				{
					jAfterGatewayLink = new JPanel();
					jTabbedPane1.addTab("After Link", null, jAfterGatewayLink, null);
					jAfterGatewayLink.setPreferredSize(new java.awt.Dimension(862, 468));
					jAfterGatewayLink.setLayout(null);
					jAfterGatewayLink.setForeground(new java.awt.Color(230,230,250));
					jAfterGatewayLink.setFont(new java.awt.Font("AlArabiya",2,12));
					jAfterGatewayLink.setName("AfterGatewayLink");

					{
						ListModel jList1Model = 
							new DefaultComboBoxModel(
									new String[] { "AfterGatewayLink",
											"AfterGatewayLink_ServerInput",
											"AfterGatewayLink_ClientOutput",
									});
						jList1 = new JList();
						jList1.setModel(jList1Model);
						jList1.setBounds(12, 35, 292, 135);
						jAfterGatewayLink.add(jList1);
						jList1.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null));
						jList1.setBackground(new java.awt.Color(26,26,26));
						jList1.setForeground(new java.awt.Color(230,230,250));
						jList1.setFont(new java.awt.Font("AlArabiya",2,14));
						jList1.addMouseListener(new MouseAdapter() {
							public void mouseClicked(MouseEvent evt) {
								jList1MouseClicked(evt);
							}
						});
					}
					{
						jServer_SocketStatus = new JLabel();
						jServer_SocketStatus.setText("Server Socket status");
						jServer_SocketStatus.setBounds(721, 333, 131, 18);
						jAfterGatewayLink.add(jServer_SocketStatus);
						jServer_SocketStatus.setFont(new java.awt.Font("AlArabiya",1,12));
					}
					{
						jPanel1 = new JPanel();
						jAfterGatewayLink.add(jPanel1);
						jPanel1.setBounds(614, 25, 10, 10);
					}
					{
						afterLinkTableModel = new AfterGatewayLinkTableModel();
						jTable1 = new JTable();
						jTable1.setEnabled(false);
						jTable1.setModel(afterLinkTableModel);

						jScrollPane1 = new JScrollPane(jTable1);
						jTable1.setPreferredScrollableViewportSize(new Dimension(561,162));
						jScrollPane1.setBounds(310, 14, 548, 157);

						jAfterGatewayLink.add(jScrollPane1);
						jScrollPane1.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null));
					}
					{
						jClientSocketStatus = new JLabel();
						jAfterGatewayLink.add(jClientSocketStatus);
						jClientSocketStatus.setText("Client Socket status");
						jClientSocketStatus.setBounds(721, 193, 131, 17);
						jClientSocketStatus.setFont(new java.awt.Font("AlArabiya",1,12));
					}
					{
						jPanel2 = new JPanel();
						jAfterGatewayLink.add(jPanel2);
						jPanel2.setBounds(715, 351, 143, 100);
						jPanel2.setBackground(new java.awt.Color(230,230,250));
						jPanel2.setBorder(BorderFactory.createTitledBorder(""));
						jPanel2.setLayout(null);
						jPanel2.add(getAfterLink_ServerSocketImage(false));
						firstTimeAfterLink_ServerImage=false;
					}
					{
						jPanel3 = new JPanel();
						jPanel3.setLayout(null);
						jAfterGatewayLink.add(jPanel3);
						jPanel3.setBounds(715, 211, 143, 100);
						jPanel3.setBackground(new java.awt.Color(230,230,250));
						jPanel3.setBorder(BorderFactory.createTitledBorder(""));
						jPanel3.add(getAfterLink_ClientSocketImage(false));
						firstTimeAfterLink_ClientImage=false;
					}
					{
						jLabel5 = new JLabel();
						jAfterGatewayLink.add(jLabel5);
						jLabel5.setText("Thread");
						jLabel5.setBounds(12, 14, 58, 15);
						jLabel5.setFont(new java.awt.Font("AlArabiya",1,14));
					}
					{
						jSeparator1 = new JSeparator();
						jAfterGatewayLink.add(jSeparator1);
						jSeparator1.setBounds(721, 323, 131, 4);
					}}
				{
					jAfterGatewayLink.add(getJTabbedPane4());
				}

			}
			thisLayout.setHorizontalGroup(thisLayout.createSequentialGroup()
					.addContainerGap()
					.addComponent(jTabbedPane1, GroupLayout.PREFERRED_SIZE, 864, GroupLayout.PREFERRED_SIZE)
					.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
			thisLayout.setVerticalGroup(thisLayout.createSequentialGroup()
					.addContainerGap()
					.addComponent(jTabbedPane1, 0, 496, Short.MAX_VALUE)
					.addGap(6));
			{
				jBeforeGatewayLink = new JPanel();
				jTabbedPane1.addTab("Before Link", null, jBeforeGatewayLink, null);
				jBeforeGatewayLink.setLayout(null);
				jBeforeGatewayLink.setPreferredSize(new java.awt.Dimension(862, 468));
				jBeforeGatewayLink.setName("BeforeGatewayLink");
				{
					jLabel3 = new JLabel();
					jBeforeGatewayLink.add(jLabel3);
					jLabel3.setText("Server Socket status");
					jLabel3.setBounds(721, 334, 131, 17);
					jLabel3.setFont(new java.awt.Font("AlArabiya",1,12));
				}
				{
					jLabel4 = new JLabel();
					jBeforeGatewayLink.add(jLabel4);
					jLabel4.setText("Client Socket status");
					jLabel4.setBounds(721, 194, 131, 15);
					jLabel4.setFont(new java.awt.Font("AlArabiya",1,12));
				}
				{

					beforeLinkTableModel = new BeforeGatewayLinkTableModel();
					jTable3 = new JTable();

					jTable3.setModel(beforeLinkTableModel);;
					jTable3.setEnabled(false);
					jScrollPane3 = new JScrollPane(jTable3);
					jTable3.setPreferredScrollableViewportSize(new Dimension(561,162));
					jScrollPane3.setBounds(310, 14, 548, 157);

					jBeforeGatewayLink.add(jScrollPane3);
					jScrollPane3.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null));

				}
				{
					ListModel jList3Model = 
						new DefaultComboBoxModel(
								new String[] { "BeforeGatewayLink",
										"BeforeGatewayLink_ServerInput",
										"BeforeGatewayLink_ClientOutput",
								});
					jList3 = new JList();
					jBeforeGatewayLink.add(jList3);
					jList3.setModel(jList3Model);
					jList3.setBounds(12, 35, 292, 135);
					jList3.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null));
					jList3.setForeground(new java.awt.Color(230,230,250));
					jList3.setBackground(new java.awt.Color(26,26,26));
					jList3.setFont(new java.awt.Font("AlArabiya",2,14));
					jList3.addMouseListener(new MouseAdapter() {
						public void mouseClicked(MouseEvent evt) {
							jList3MouseClicked(evt);
						}
					});

				}
				{
					jPanel4 = new JPanel();
					jBeforeGatewayLink.add(jPanel4);
					jPanel4.setBounds(715, 351, 143, 100);
					jPanel4.setBackground(new java.awt.Color(230,230,250));
					jPanel4.setBorder(BorderFactory.createTitledBorder(""));
					jPanel4.setLayout(null);
					jPanel4.add(getBeforeLink_ServerSocketImage(false));
					firstTimeBeforeLink_ServerImage=false;
				}
				{
					jPanel5 = new JPanel();
					jBeforeGatewayLink.add(jPanel5);
					jPanel5.setBounds(715, 211, 143, 100);
					jPanel5.setBackground(new java.awt.Color(230,230,250));
					jPanel5.setBorder(BorderFactory.createTitledBorder(""));
					jPanel5.setLayout(null);
					jPanel5.add(getBeforeLink_ClientSocketImage(false));
					firstTimeBeforeLink_ClientImage=false;
				}
				{
					jSeparator2 = new JSeparator();
					jBeforeGatewayLink.add(jSeparator2);
					jSeparator2.setBounds(721, 323, 131, 4);
				}
				{
					jLabel7 = new JLabel();
					jBeforeGatewayLink.add(jLabel7);
					jBeforeGatewayLink.add(getJTabbedPane3());
					jLabel7.setText("Thread");
					jLabel7.setBounds(12, 14, 62, 15);
					jLabel7.setFont(new java.awt.Font("AlArabiya",1,14));
				}

			}
			{
				jMasterJobServer = new JPanel();
				jTabbedPane1.addTab("Master Job Server", null, jMasterJobServer, null);
				jTabbedPane1.addTab("Runtime MasterJob", null, getJRunTimePanel(), null);
				jTabbedPane1.addTab("Inquiry monitor", null, getInquiryMonitor(), null);
				jMasterJobServer.setPreferredSize(new java.awt.Dimension(862, 468));
				jMasterJobServer.setLayout(null);
				jMasterJobServer.setName("MasterJobServer");

				{
					jLabel2 = new JLabel();
					jMasterJobServer.add(jLabel2);
					jLabel2.setText("Server Job Socket status");
					jLabel2.setBounds(614, 192, 166, 17);
					jLabel2.setFont(new java.awt.Font("AlArabiya",1,12));
				}
				{
					masterJobTableModel = 	new MasterJobTableModel();
					jTable2 = new JTable();

					jTable2.setModel(masterJobTableModel);
					jTable2.setEnabled(false);
					jScrollPane2 = new JScrollPane(jTable2);
					jTable2.setPreferredScrollableViewportSize(new Dimension(661,172));
					jScrollPane2.setBounds(310, 14, 548, 157);

					jMasterJobServer.add(jScrollPane2);
					jScrollPane2.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null));

				}
				{
					ListModel jList2Model = 
						new DefaultComboBoxModel(
								new String[] { "MasterJobServerThread"});
					jList2 = new JList();
					jMasterJobServer.add(jList2);
					jList2.setModel(jList2Model);
					jList2.setBounds(12, 35, 292, 134);
					jList2.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null));
					jList2.setBackground(new java.awt.Color(26,26,26));
					jList2.setFont(new java.awt.Font("AlArabiya",2,14));
					jList2.setForeground(new java.awt.Color(230,230,250));
					jList2.addMouseListener(new MouseAdapter() {
						public void mouseClicked(MouseEvent evt) {
							jList2MouseClicked(evt);
						}
					});

				}
				{
					jPanel6 = new JPanel();
					jMasterJobServer.add(jPanel6);
					jPanel6.setBounds(614, 215, 244, 236);
					jPanel6.setBackground(new java.awt.Color(230,230,250));
					jPanel6.setBorder(BorderFactory.createTitledBorder(""));
					jPanel6.add(getMasterJobConnectionImage(false));
					firstTimeMasterConnectionImage=false;
				}
				{
					jMasterJobConsole = new JPanel();
					jMasterJobServer.add(jMasterJobConsole);
					jMasterJobConsole.setBounds(6, 189, 596, 263);
					jMasterJobConsole.add(getJTabbedPane2());
				}

				{
					jLabel1 = new JLabel();
					jMasterJobServer.add(jLabel1);
					jLabel1.setText("Thread");
					jLabel1.setBounds(12, 14, 64, 15);
					jLabel1.setFont(new java.awt.Font("AlArabiya",1,14));
				}
			}

			{
				readJobXml();
			}

			//Hot Setting tab
			jTabbedPane1.addTab("Hot Setting", null, getJHotSetting(), null);

			jTabbedPane1.setName("Pannello TAB");

			pack();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * @return the jPanel6
	 */
	public JPanel getjPanel6() {
		return jPanel6;
	}

	/**
	 * @return the jConsoleEventiBeforeGatewayLink
	 */
	public JTextArea getjConsoleEventiBeforeGatewayLink() {
		return jConsoleEventiBeforeGatewayLink;
	}

	/**
	 * @return the jTable3
	 */
	public JTable getjTable3() {
		return jTable3;
	}

	/**
	 * Metodo che recupera e restituisce tutti i parametri del MasterJobServerThread
	 * @return
	 */
	public Object[] getMasterJobStatus() {

		Object[] data = new Object[12];
		data[0]=getMaster().getMasterJobServerThread().getState().toString();
		data[1]=masterJobServerThread.getMasterJobServerSocket().toString();
		data[11]=masterJobServerThread.getSlaveIP().toString();
		data[3]=masterJobServerThread.getLastSignalSend();
		data[4]=masterJobServerThread.getLastSignalReceived();
		data[5]=master.getBeforeGatewayLinkThread().getState().toString();
		data[6]=master.getAfterGatewayLinkThread().getState().toString();
		data[7]=master.getDefaultFileName();
		data[8]=master.getBeforeGatewayLink().getBeforeGatewayLink_ClientOutputThread().getState().toString();
		data[9]=master.getAfterGatewayLink().getAfterGatewayLink_ClientOutputThread().getState().toString();
		data[10]=masterJobServerThread.getInquiryThread().getState().toString();
		if (masterJobServerThread.getSlaveClientSocket()!=null)
			data[2]=masterJobServerThread.getSlaveClientSocket().toString();
		else data[2]="-";

		return data;
	}

	/**
	 * Metodo che recupera e restituisce tutti i parametri del BeforeGatewayLinkThread
	 * @return
	 */
	public Object[] getBeforeGatewayLinkStatus() {

		Object[] data = new Object[8];
		data[0]=getMaster().getBeforeGatewayLinkThread().getState().toString();
		data[1]=beforeGatewayLinkThread.getBeforeGatewayLink_ServerInputSocket().toString();
		data[2]=beforeGatewayLinkThread.getServer_serverInputPort();
		data[3]=beforeGatewayLinkThread.getServer_serverIP().toString();
		data[4]=beforeGatewayLinkThread.getSlaveIP().toString();
		data[5]=beforeGatewayLinkThread.getSlaveDeleteServerPort_before();
		data[6]=beforeGatewayLinkThread.getBeforeGatewayLink_ServerInputThread().getState().toString();
		data[7]=beforeGatewayLinkThread.getBeforeGatewayLink_ClientOutputThread().getState().toString();

		return data;
	}

	/**
	 * Metodo che recupera e restituisce tutti i parametri del BeforeGatewayLink_ServerInputThread
	 * @return
	 */
	public Object[] getBeforeGatewayLink_ServerInputStatus() {

		Object[] data = new Object[6];
		data[0]=beforeGatewayLinkThread.getBeforeGatewayLink_ServerInputThread().getState().toString();
		if ((beforeGatewayLinkThread.getBeforeGatewayLink_ServerInput().getLocalBeforeGatewayLink_ClientSocket())!=null) 
			data[1]=beforeGatewayLinkThread.getBeforeGatewayLink_ServerInput().getLocalBeforeGatewayLink_ClientSocket().toString();
		else data[1]="-";
		data[2]=beforeGatewayLinkThread.getBeforeGatewayLink_ServerInput().getLocalGatewayServerSocket().toString();
		data[3]=beforeGatewayLinkThread.getBeforeGatewayLink_ServerInput().getLastSignalSent();
		data[4]=beforeGatewayLinkThread.getBeforeGatewayLink_ServerInput().getLastSignalReceived();
		data[5]=beforeGatewayLinkThread.getBeforeGatewayLink_ServerInput().getMasterDeleteClient_BeforeLinkThread().getState();

		return data;
	}

	/**
	 * Metodo che recupera e restituisce tutti i parametri del BeforeGatewayLink_ClientOutputThread
	 * @return
	 */
	public Object[] getBeforeGatewayLink_ClientOutputStatus() {

		Object[] data = new Object[4];
		data[0]=beforeGatewayLinkThread.getBeforeGatewayLink_ClientOutputThread().getState().toString();
		if ((beforeGatewayLinkThread.getBeforeGatewayLink_ClientOutput().getLocalBeforeGatewayLink_ClientSocket())!=null) 
			data[1]=beforeGatewayLinkThread.getBeforeGatewayLink_ClientOutput().getLocalBeforeGatewayLink_ClientSocket().toString();
		else data[1]="-";
		data[2]=beforeGatewayLinkThread.getBeforeGatewayLink_ServerInput().getLastSignalSent();
		data[3]=beforeGatewayLinkThread.getBeforeGatewayLink_ServerInput().getLastSignalReceived();

		return data;
	}


	/**
	 * Metodo che recupera e restituisce tutti i parametri del AfterGatewayLinkThread
	 * @return
	 */
	public Object[] getAfterGatewayLinkStatus() {

		Object[] data = new Object[8];
		data[0]=getMaster().getAfterGatewayLinkThread().getState().toString();
		data[1]=afterGatewayLinkThread.getAfterGatewayLink_ServerInputSocket().toString();
		data[2]=afterGatewayLinkThread.getClient_serverInputPort();
		data[3]=afterGatewayLinkThread.getClient_serverIP().toString();
		data[4]=afterGatewayLinkThread.getSlaveIP().toString();
		data[5]=afterGatewayLinkThread.getSlaveDeleteServerPort_after();
		data[6]=afterGatewayLinkThread.getAfterGatewayLink_ServerInputThread().getState().toString();
		data[7]=afterGatewayLinkThread.getAfterGatewayLink_ClientOutputThread().getState().toString();

		return data;
	}

	/**
	 * Metodo che recupera e restituisce tutti i parametri del AfterGatewayLink_ServerInputThread
	 * @return
	 */
	public Object[] getAfterGatewayLink_ServerInputStatus() {

		Object[] data = new Object[6];
		data[0]=afterGatewayLinkThread.getAfterGatewayLink_ServerInputThread().getState().toString();
		if ((afterGatewayLinkThread.getAfterGatewayLink_ServerInput().getLocalAfterGatewayLink_ClientSocket())!=null) 
			data[1]=afterGatewayLinkThread.getAfterGatewayLink_ServerInput().getLocalAfterGatewayLink_ClientSocket().toString();
		else data[1]="-";
		data[2]=afterGatewayLinkThread.getAfterGatewayLink_ServerInput().getLocalAfterGatewayLink_ServerSocket().toString();
		data[3]=afterGatewayLinkThread.getAfterGatewayLink_ServerInput().getLastSignalSent();
		data[4]=afterGatewayLinkThread.getAfterGatewayLink_ServerInput().getLastSignalReceived();
		data[5]=afterGatewayLinkThread.getAfterGatewayLink_ServerInput().getMasterDeleteClient_AfterLinkThread().getState();

		return data;
	}


	/**
	 * Metodo che recupera e restituisce tutti i parametri del AfterGatewayLink_ClientOutputThread
	 * @return
	 */
	public Object[] getAfterGatewayLink_ClientOutputStatus() {

		Object[] data = new Object[4];
		data[0]=afterGatewayLinkThread.getAfterGatewayLink_ClientOutputThread().getState().toString();
		if ((afterGatewayLinkThread.getAfterGatewayLink_ClientOutput().getLocalAfterGatewayLink_ClientSocket())!=null) 
			data[1]=afterGatewayLinkThread.getAfterGatewayLink_ClientOutput().getLocalAfterGatewayLink_ClientSocket().toString();
		else data[1]="-";
		data[2]=afterGatewayLinkThread.getAfterGatewayLink_ServerInput().getLastSignalSent();
		data[3]=afterGatewayLinkThread.getAfterGatewayLink_ServerInput().getLastSignalReceived();

		return data;
	}


	/**
	 * @return the jScrollPane2
	 */
	public JScrollPane getjScrollPane2() {
		return jScrollPane2;
	}

	/**
	 * @return the jTable2
	 */
	public JTable getjTable2() {
		return jTable2;
	}

	/**
	 * @return the jTable1
	 */
	public JTable getjTable1() {
		return jTable1;
	}

	private void jList1MouseClicked(MouseEvent evt) {
		JList theList = (JList) evt.getSource();     
		int index = theList.locationToIndex(evt.getPoint());
		if (index >= 0) {
			Object o = theList.getModel().getElementAt(index);
			jList1currentSelection=o.toString();
			if (jList1currentSelection.equalsIgnoreCase("AfterGatewayLink")) {
				afterLinkTableModel = new AfterGatewayLinkTableModel();
				getjTable1().setModel(afterLinkTableModel);
			}
			if (jList1currentSelection.equalsIgnoreCase("AfterGatewayLink_ServerInput")) {
				afterLink_ServerInputTableModel = new AfterGatewayLink_ServerInputTableModel();
				getjTable1().setModel(afterLink_ServerInputTableModel);
			}
			if (jList1currentSelection.equalsIgnoreCase("AfterGatewayLink_ClientOutput")) {
				afterLink_ClientOutputTableModel = new AfterGatewayLink_ClientOutputTableModel();
				getjTable1().setModel(afterLink_ClientOutputTableModel);
			}
		}
	}

	private void jList3MouseClicked(MouseEvent evt) {
		JList theList = (JList) evt.getSource();     
		int index = theList.locationToIndex(evt.getPoint());
		if (index >= 0) {
			Object o = theList.getModel().getElementAt(index);
			jList3currentSelection=o.toString();
			if (jList3currentSelection.equalsIgnoreCase("BeforeGatewayLink")) {
				beforeLinkTableModel = new BeforeGatewayLinkTableModel();
				getjTable3().setModel(beforeLinkTableModel);
			}
			if (jList3currentSelection.equalsIgnoreCase("BeforeGatewayLink_ServerInput")) {
				beforeLink_ServerInputTableModel = new BeforeGatewayLink_ServerInputTableModel();
				getjTable3().setModel(beforeLink_ServerInputTableModel);
			}
			if (jList3currentSelection.equalsIgnoreCase("BeforeGatewayLink_ClientOutput")) {
				beforeLink_ClientOutputTableModel = new BeforeGatewayLink_ClientOutputTableModel();
				getjTable3().setModel(beforeLink_ClientOutputTableModel);
			}
		}
	}

	private void jList2MouseClicked(MouseEvent evt) {
		JList theList = (JList) evt.getSource();     
		int index = theList.locationToIndex(evt.getPoint());
		if (index >= 0) {
			Object o = theList.getModel().getElementAt(index);
			jList2currentSelection=o.toString();
			masterJobTableModel = new MasterJobTableModel();
			getjTable2().setModel(masterJobTableModel);
		}
	}

	/**
	 * *********************************************************************************************
	 * Metodo che cattura gli eventi scatenati dalle classi Observable tramite notifyObservers(arg)
	 * *********************************************************************************************
	 */
	@Override
	public void update(Observable o, Object arg) {

		if (arg instanceof MasterJobServer) {
			masterJobServerThread = (MasterJobServer) arg;

			/**
			 * Aggiorno i dati della tabella
			 */
			masterJobTableModel = new MasterJobTableModel();
			getjTable2().setModel(masterJobTableModel);
			if (!(masterJobServerThread.getConsoleMessage().equalsIgnoreCase(masterJobConsoleMessage))) {
				masterJobConsoleMessage=masterJobServerThread.getConsoleMessage();
				getJConsoleEventiTextArea().append(masterJobConsoleMessage+aCapo);
				getJConsoleEventiTextArea().setCaretPosition(getJConsoleEventiTextArea().getDocument().getLength()); 
			}
			if (masterJobServerThread.getSlaveClientSocket()==null) {
			} 
			else if (masterJobServerThread.getSlaveClientSocket().isConnected()==false) {
				getMasterJobConnectionImage(false);
			}
			else {
				getMasterJobConnectionImage(true);
			}

			/**
			 * Controllo flusso di esecuzione
			 */
			int tmp = masterJobServerThread.getPosition();
			if (tmp==0) {
				getJLabel_End(false);
				getJLabel_Inquiring(true);
			}
			else if (tmp==1) {
				addClient();
				getJLabel_Inquiring(false);
				getJLabel_InquiryToSlave(true);
			} else if (tmp==2) {
				getJLabel_InquiryToSlave(false);
				getJLabel_InquiryReadySignal(true);
			} else if (tmp==3) {
				getJLabel_InquiryReadySignal(false);
				getJLabel_WaitForSlaveInquirySignal(true);
			} else if (tmp==4) {
				getJLabel_WaitForSlaveInquirySignal(false);
				getJLabel_OkDownloadXmlSignal(true);
			} else if (tmp==5) {
				getJLabel_OkDownloadXmlSignal(false);
				getJLabel_DownloadXml(true);
			} else if (tmp==6) {
				getJLabel_Slave(true);
				readLocalXml();
			} else if (tmp==7) {
				getJLabel_Before(true);
				readBeforeXml();
			} else if (tmp==8) {
				getJLabel_After(true);
				readAfterXml();
			} else if (tmp==9) {
				getJLabel_Before(false);
				getJLabel_DownloadXml(false);
				getJLabel_After(false);
				getJLabel_LoadBalancingSignalBefore(true);
				getJLabel_SemaphoreBefore(1);
				readJobXml();
			} else if (tmp==10) {
				getJLabel_LoadBalancingSignalAfter(true);
				getJLabel_SemaphoreAfter(1);
				readJobXml();
			} else if (tmp==11) {
				getJLabel_LoadBalancingSignalBefore(false);
				getJLabel_LoadBalancingSignalAfter(false);
				getJLabel_StealBefore(true);
				readJobXml();
				if (masterJobServerThread.getBeforeFlag()) {
					getJLabel_YesSignalBefore(true);
					getJLabel_SemaphoreBefore(2);
				}
				else {
					getJLabel_NoSignalBefore(true);
					getJLabel_SemaphoreBefore(0);
				}
			} else if (tmp==12) {
				getJLabel_StealAfter(true);
				readJobXml();
				if (masterJobServerThread.getAfterFlag()) {
					getJLabel_YesSignalAfter(true);
					getJLabel_SemaphoreAfter(2);
				}
				else {
					getJLabel_NoSignalAfter(true);
					getJLabel_SemaphoreAfter(0);
				}
			} else if (tmp==13) {
				getJLabel_StealBefore(false);
				getJLabel_StealAfter(false);
				getJLabel_YesSignalBefore(false);
				getJLabel_NoSignalBefore(false);
				getJLabel_NoSignalAfter(false);
				getJLabel_YesSignalAfter(false);
				getJLabel_SemaphoreBefore(0);
				getJLabel_SemaphoreAfter(0);
				getJLabel_GotBeforeTransferJob(true);
				getJLabel_GotAfterTransferJob(true);

			} else if (tmp==14) {
				getJLabel_Slave(false);
				getJLabel_MergeXml(true);
				readJobXml();

			} else if (tmp==15) {
				getJLabel_GotBeforeTransferJob(false);
				getJLabel_GotAfterTransferJob(false);
				getJLabel_MergeXml(false);
				getJLabel_SendJobToSlave(true);
				getJLabel_JobReadySignal(true);
				readJobXml();

			} else if (tmp==16) {
				getJLabel_SendJobToSlave(false);
				getJLabel_WaitForJobReceived(true);
				readJobXml();

			} else if (tmp==17) {
				getJLabel_JobReadyReceivedSignal(true);
				readJobXml();

			} else if (tmp==18) {
				getJLabel_JobReadySignal(false);
				getJLabel_JobReadySignal(false);
				getJLabel_WaitForJobReceived(false);
				getJLabel_JobReadyReceivedSignal(false);
				getJLabel_End(true);
			}


		}

		//Before Link
		if (arg instanceof BeforeGatewayLink) {
			beforeGatewayLinkThread = (BeforeGatewayLink) arg;
			/**
			 * Aggiorno i dati della tabella
			 */
			beforeLinkTableModel = new BeforeGatewayLinkTableModel();
			getjTable3().setModel(beforeLinkTableModel);
			if (!(beforeGatewayLinkThread.getConsoleMessage().equalsIgnoreCase(beforeLinkConsoleMessage))) {
				beforeLinkConsoleMessage=beforeGatewayLinkThread.getConsoleMessage();
				getJConsoleEventiBeforeGatewayLink().append(beforeLinkConsoleMessage+aCapo);
				getJConsoleEventiBeforeGatewayLink().setCaretPosition(getJConsoleEventiBeforeGatewayLink().getDocument().getLength()); 
			}
		}

		if (arg instanceof BeforeGatewayLink_ServerInput) {
			beforeLink_ServerInput = (BeforeGatewayLink_ServerInput) arg;
			/**
			 * Aggiorno i dati della tabella
			 */
			beforeLink_ServerInputTableModel = new BeforeGatewayLink_ServerInputTableModel();
			if (jList3currentSelection.equalsIgnoreCase("BeforeGatewayLink_ServerInput")) {
				getjTable3().setModel(beforeLink_ServerInputTableModel);
			}
			if (!(beforeLink_ServerInput.getConsoleMessage().equalsIgnoreCase(beforeLink_ServerInputConsoleMessage))) {
				beforeLink_ServerInputConsoleMessage=beforeLink_ServerInput.getConsoleMessage();
				getJConsoleEventiBeforeGatewayLink().append(beforeLink_ServerInputConsoleMessage+aCapo);
				getJConsoleEventiBeforeGatewayLink().setCaretPosition(getJConsoleEventiBeforeGatewayLink().getDocument().getLength()); 
			}
			if (beforeLink_ServerInput.getLocalBeforeGatewayLink_ClientSocket()==null) {
				//System.out.println("beforeLink_ServerInput.getLocalClientSocket() == null");
			} else if (beforeLink_ServerInput.getLocalBeforeGatewayLink_ClientSocket().isConnected()==false) getBeforeLink_ServerSocketImage(false);
			else getBeforeLink_ServerSocketImage(true);

		}

		if (arg instanceof BeforeGatewayLink_ClientOutput) {
			beforeLink_ClientOutput = (BeforeGatewayLink_ClientOutput) arg;
			/**
			 * Aggiorno i dati della tabella
			 */
			beforeLink_ClientOutputTableModel = new BeforeGatewayLink_ClientOutputTableModel();
			if (jList3currentSelection.equalsIgnoreCase("BeforeGatewayLink_ClientOutput")) {
				getjTable3().setModel(beforeLink_ClientOutputTableModel);
			}
			if (!(beforeLink_ClientOutput.getConsoleMessage().equalsIgnoreCase(beforeLink_ClientOutputConsoleMessage))) {
				beforeLink_ClientOutputConsoleMessage=beforeLink_ClientOutput.getConsoleMessage();
				getJConsoleEventiBeforeGatewayLink().append(beforeLink_ClientOutputConsoleMessage+aCapo);
				getJConsoleEventiBeforeGatewayLink().setCaretPosition(getJConsoleEventiBeforeGatewayLink().getDocument().getLength()); 
			}
			if (beforeLink_ClientOutput.getLocalBeforeGatewayLink_ClientSocket()==null) {
				//System.out.println("beforeLink_ClientOutput.getLocalClientSocket() == null");
			} else if (beforeLink_ClientOutput.getLocalBeforeGatewayLink_ClientSocket().isConnected()==false) getBeforeLink_ClientSocketImage(false);
			else getBeforeLink_ClientSocketImage(true);

		}

		//After Link
		if (arg instanceof AfterGatewayLink) {
			afterGatewayLinkThread = (AfterGatewayLink) arg;
			/**
			 * Aggiorno i dati della tabella
			 */
			afterLinkTableModel = new AfterGatewayLinkTableModel();
			getjTable1().setModel(afterLinkTableModel);
			if (!(afterGatewayLinkThread.getConsoleMessage().equalsIgnoreCase(afterLinkConsoleMessage))) {
				afterLinkConsoleMessage=afterGatewayLinkThread.getConsoleMessage();
				getJConsoleEventiAfterGatewayLink().append(afterLinkConsoleMessage+aCapo);
				getJConsoleEventiAfterGatewayLink().setCaretPosition(getJConsoleEventiAfterGatewayLink().getDocument().getLength()); 
			}
		}

		if (arg instanceof AfterGatewayLink_ServerInput) {
			afterLink_ServerInput = (AfterGatewayLink_ServerInput) arg;
			/**
			 * Aggiorno i dati della tabella
			 */
			afterLink_ServerInputTableModel = new AfterGatewayLink_ServerInputTableModel();
			if (jList1currentSelection.equalsIgnoreCase("AfterGatewayLink_ServerInput")) {
				getjTable1().setModel(afterLink_ServerInputTableModel);
			}
			if (!(afterLink_ServerInput.getConsoleMessage().equalsIgnoreCase(afterLink_ServerInputConsoleMessage))) {
				afterLink_ServerInputConsoleMessage=afterLink_ServerInput.getConsoleMessage();
				getJConsoleEventiAfterGatewayLink().append(afterLink_ServerInputConsoleMessage+aCapo);
				getJConsoleEventiAfterGatewayLink().setCaretPosition(getJConsoleEventiAfterGatewayLink().getDocument().getLength()); 
			}
			if (afterLink_ServerInput.getLocalAfterGatewayLink_ClientSocket()==null) {
				//System.out.println("afterLink_ServerInput.getLocalClientSocket() == null");
			} else if (afterLink_ServerInput.getLocalAfterGatewayLink_ClientSocket().isConnected()==false) getAfterLink_ServerSocketImage(false);
			else getAfterLink_ServerSocketImage(true);
		}

		if (arg instanceof AfterGatewayLink_ClientOutput) {
			afterLink_ClientOutput = (AfterGatewayLink_ClientOutput) arg;
			/**
			 * Aggiorno i dati della tabella
			 */
			afterLink_ClientOutputTableModel = new AfterGatewayLink_ClientOutputTableModel();
			if (jList1currentSelection.equalsIgnoreCase("AfterGatewayLink_ClientOutput")) {
				getjTable1().setModel(afterLink_ClientOutputTableModel);
			}
			if (!(afterLink_ClientOutput.getConsoleMessage().equalsIgnoreCase(afterLink_ClientOutputConsoleMessage))) {
				afterLink_ClientOutputConsoleMessage=afterLink_ClientOutput.getConsoleMessage();
				getJConsoleEventiAfterGatewayLink().append(afterLink_ClientOutputConsoleMessage+aCapo);
				getJConsoleEventiAfterGatewayLink().setCaretPosition(getJConsoleEventiAfterGatewayLink().getDocument().getLength()); 
			}
			if (afterLink_ClientOutput.getLocalAfterGatewayLink_ClientSocket()==null) {
				//System.out.println("afterLink_ClientOutput.getLocalClientSocket() == null");
			} else if (afterLink_ClientOutput.getLocalAfterGatewayLink_ClientSocket().isConnected()==false) getAfterLink_ClientSocketImage(false);
			else getAfterLink_ClientSocketImage(true);
		}

		if (arg instanceof String) {
			getJConsoleEventiTextArea().append((String)arg+aCapo);
		}
	}

	/**
	 * INIZIO PARTE GETJCONSOLE EVENTI
	 * @return
	 */

	public JTextArea getJConsoleEventiTextArea() {
		return jConsoleEventiTextArea;
	}

	public JPanel getJPanelConsoleEventiAfterGatewayLink() {
		return jPanelConsoleEventiAfterGatewayLink;
	}

	public JTextArea getJConsoleEventiAfterGatewayLink() {
		return jConsoleEventiAfterGatewayLink;
	}

	public JTextArea getJConsoleEventiBeforeGatewayLink() {
		return jConsoleEventiBeforeGatewayLink;
	}

	/**
	 * INIZIO PARTE IMMAGINI CONNECTED-DISCONNECTED
	 * @param connection
	 * @return
	 */
	public JLabel getMasterJobConnectionImage(boolean connection) {

		if (!firstTimeMasterConnectionImage) jPanel6.remove(masterJobConnectionImage);

		int tipo = 0;	
		if (connection) tipo = 1;

		masterJobConnectionImage = new MyConnectionLabel(tipo);	
		masterJobConnectionImage.setPreferredSize(new java.awt.Dimension(224, 202));
		masterJobConnectionImage.repaint();
		jPanel6.add(masterJobConnectionImage);

		return masterJobConnectionImage;
	}

	public JLabel getBeforeLink_ClientSocketImage(boolean connection) {

		if (!firstTimeBeforeLink_ClientImage) jPanel5.remove(beforeLink_ClientSocketImage);

		int tipo = 2;
		if (connection) tipo = 3;

		beforeLink_ClientSocketImage = new MyConnectionLabel(tipo);
		beforeLink_ClientSocketImage.setBounds(14, 3, 115, 90);
		beforeLink_ClientSocketImage.repaint();
		jPanel5.add(beforeLink_ClientSocketImage);

		return beforeLink_ClientSocketImage;
	}

	public JLabel getBeforeLink_ServerSocketImage(boolean connection) {

		if (!firstTimeBeforeLink_ServerImage) jPanel4.remove(beforeLink_ServerSocketImage);

		int tipo = 2;
		if (connection) tipo = 3;

		beforeLink_ServerSocketImage = new MyConnectionLabel(tipo);
		beforeLink_ServerSocketImage.setBounds(14, 4, 115, 89);
		beforeLink_ServerSocketImage.repaint();
		jPanel4.add(beforeLink_ServerSocketImage);

		return beforeLink_ServerSocketImage;
	}

	public JLabel getAfterLink_ClientSocketImage(boolean connection) {

		if (!firstTimeAfterLink_ClientImage) jPanel3.remove(afterLink_ClientSocketImage);

		int tipo = 2;
		if (connection) tipo = 3;

		afterLink_ClientSocketImage = new MyConnectionLabel(tipo);
		afterLink_ClientSocketImage.setBounds(14, 3, 115, 90);
		afterLink_ClientSocketImage.repaint();
		jPanel3.add(afterLink_ClientSocketImage);

		return afterLink_ClientSocketImage;
	}

	public JLabel getAfterLink_ServerSocketImage(boolean connection) {

		if (!firstTimeAfterLink_ServerImage) jPanel2.remove(afterLink_ServerSocketImage);

		int tipo = 2;
		if (connection) tipo = 3;

		afterLink_ServerSocketImage = new MyConnectionLabel(tipo);
		afterLink_ServerSocketImage.setBounds(14, 4, 115, 89);
		afterLink_ServerSocketImage.repaint();
		jPanel2.add(afterLink_ServerSocketImage);

		return afterLink_ServerSocketImage;
	}

	/**
	 * Click sul tab AfterGatewayLink
	 * @param evt
	 */
	private void jAfterGatewayLinkMouseClicked(MouseEvent evt) {
		if (jList1currentSelection.equalsIgnoreCase("AfterGatewayLink")) {
			afterLinkTableModel = new AfterGatewayLinkTableModel();
			getjTable1().setModel(afterLinkTableModel);
		}
		if (jList1currentSelection.equalsIgnoreCase("AfterGatewayLink_ServerInput")) {
			afterLink_ServerInputTableModel = new AfterGatewayLink_ServerInputTableModel();
			getjTable1().setModel(afterLink_ServerInputTableModel);
		}
		if (jList1currentSelection.equalsIgnoreCase("AfterGatewayLink_ClientOutput")) {
			afterLink_ClientOutputTableModel = new AfterGatewayLink_ClientOutputTableModel();
			getjTable1().setModel(afterLink_ClientOutputTableModel);
		}
		if (afterLink_ClientOutput.getLocalAfterGatewayLink_ClientSocket()==null) {
		} else if (afterLink_ClientOutput.getLocalAfterGatewayLink_ClientSocket().isConnected()==false) getAfterLink_ClientSocketImage(false);
		else getAfterLink_ClientSocketImage(true);

		if (afterLink_ServerInput.getLocalAfterGatewayLink_ClientSocket()==null) {
		} else if (afterLink_ServerInput.getLocalAfterGatewayLink_ClientSocket().isConnected()==false) getAfterLink_ServerSocketImage(false);
		else getAfterLink_ServerSocketImage(true);
	}

	/**
	 * Click sul tab BeforeGatewayLink
	 * @param evt
	 */
	private void jBeforeGatewayLinkMouseClicked(MouseEvent evt) {
		if (jList3currentSelection.equalsIgnoreCase("BeforeGatewayLink")) {
			beforeLinkTableModel = new BeforeGatewayLinkTableModel();
			getjTable3().setModel(beforeLinkTableModel);
		}
		if (jList3currentSelection.equalsIgnoreCase("BeforeGatewayLink_ServerInput")) {
			beforeLink_ServerInputTableModel = new BeforeGatewayLink_ServerInputTableModel();
			getjTable3().setModel(beforeLink_ServerInputTableModel);
		}
		if (jList3currentSelection.equalsIgnoreCase("BeforeGatewayLink_ClientOutput")) {
			beforeLink_ClientOutputTableModel = new BeforeGatewayLink_ClientOutputTableModel();
			getjTable3().setModel(beforeLink_ClientOutputTableModel);
		}

		if (beforeLink_ClientOutput.getLocalBeforeGatewayLink_ClientSocket()==null) {
			//System.out.println("beforeLink_ClientOutput.getLocalClientSocket() == null");
		} else if (beforeLink_ClientOutput.getLocalBeforeGatewayLink_ClientSocket().isConnected()==false) getBeforeLink_ClientSocketImage(false);
		else getBeforeLink_ClientSocketImage(true);

		if (beforeLink_ServerInput.getLocalBeforeGatewayLink_ClientSocket()==null) {
			//System.out.println("beforeLink_ServerInput.getLocalClientSocket() == null");
		} else if (beforeLink_ServerInput.getLocalBeforeGatewayLink_ClientSocket().isConnected()==false) getBeforeLink_ServerSocketImage(false);
		else getBeforeLink_ServerSocketImage(true);
	}

	/**
	 * Click sul tab Master Job Server
	 * @param evt
	 */
	private void jMasterJobServerMouseClicked(MouseEvent evt) {
		getjTable2().setModel(masterJobTableModel);
	}

	private void jTabbedPane1MouseClicked(MouseEvent evt) {
		JTabbedPane tmp = (JTabbedPane) evt.getSource();
		if (tmp.getSelectedComponent().getName()!=null) {
			if (tmp.getSelectedComponent().getName().equalsIgnoreCase("BeforeGatewayLink"))
				jBeforeGatewayLinkMouseClicked(evt);
			if (tmp.getSelectedComponent().getName().equalsIgnoreCase("AfterGatewayLink"))
				jAfterGatewayLinkMouseClicked(evt);
			if (tmp.getSelectedComponent().getName().equalsIgnoreCase("MasterJobServer"))
				jMasterJobServerMouseClicked(evt);
		}
	}

	/**
	 * Pannello runtime Master Job
	 * @return
	 */
	public JPanel getJRunTimePanel() {
		if(jRunTimeMasterJob == null) {
			jRunTimeMasterJob = new JPanel();
			jRunTimeMasterJob.setName("RuntimeMasterJob");
			jRunTimeMasterJob.setBackground(new java.awt.Color(234,255,221));
			jRunTimeMasterJob.setLayout(null);
			jRunTimeMasterJob.add(getJLabel9());
			jRunTimeMasterJob.add(getJLabel_Inquiring(false));
			jRunTimeMasterJob.add(getJLabel10());
			jRunTimeMasterJob.add(getJLabel_InquiryToSlave(false));
			jRunTimeMasterJob.add(getJLabel11());
			jRunTimeMasterJob.add(getJLabel_WaitForSlaveInquirySignal(false));
			jRunTimeMasterJob.add(getJLabel12());
			jRunTimeMasterJob.add(getJLabel_DownloadXml(false));
			jRunTimeMasterJob.add(getJLabel13());
			jRunTimeMasterJob.add(getJLabel14());
			jRunTimeMasterJob.add(getJLabel15());
			jRunTimeMasterJob.add(getJLabel_Slave(false));
			jRunTimeMasterJob.add(getJLabel_Before(false));
			jRunTimeMasterJob.add(getJLabel_After(false));
			jRunTimeMasterJob.add(getJLabel16());
			jRunTimeMasterJob.add(getJLabel17());
			jRunTimeMasterJob.add(getJLabel_StealBefore(false));
			jRunTimeMasterJob.add(getJLabel_StealAfter(false));
			jRunTimeMasterJob.add(getJLabel18());
			jRunTimeMasterJob.add(getJLabel19());
			jRunTimeMasterJob.add(getJLabel_SemaphoreBefore(0));
			jRunTimeMasterJob.add(getJLabel_SemaphoreAfter(0));
			jRunTimeMasterJob.add(getJLabel20());
			jRunTimeMasterJob.add(getJLabel21());
			jRunTimeMasterJob.add(getJLabel22());
			jRunTimeMasterJob.add(getJLabel23());
			jRunTimeMasterJob.add(getJLabel_GotBeforeTransferJob(false));
			jRunTimeMasterJob.add(getJLabel_GotAfterTransferJob(false));
			jRunTimeMasterJob.add(getJLabel_MergeXml(false));
			jRunTimeMasterJob.add(getJLabel24());
			jRunTimeMasterJob.add(getJLabel25());
			jRunTimeMasterJob.add(getJLabel26());
			jRunTimeMasterJob.add(getJLabel27());
			jRunTimeMasterJob.add(getJLabel_SendJobToSlave(false));
			jRunTimeMasterJob.add(getJLabel28());
			jRunTimeMasterJob.add(getJLabel_WaitForJobReceived(false));
			jRunTimeMasterJob.add(getJLabel29());
			jRunTimeMasterJob.add(getJLabel_End(false));
			jRunTimeMasterJob.add(getJLabel_InquiryReadySignal(false));
			jRunTimeMasterJob.add(getJLabel_OkDownloadXmlSignal(false));
			jRunTimeMasterJob.add(getJLabel_LoadBalancingSignalAfter(false));
			jRunTimeMasterJob.add(getJLabel_LoadBalancingSignalBefore(false));
			jRunTimeMasterJob.add(getJLabel_YesSignalBefore(false));
			jRunTimeMasterJob.add(getJLabel_YesSignalAfter(false));
			jRunTimeMasterJob.add(getJLabel36());
			jRunTimeMasterJob.add(getJLabel37());
			jRunTimeMasterJob.add(getJLabel_NoSignalBefore(false));
			jRunTimeMasterJob.add(getJLabel_NoSignalAfter(false));
			jRunTimeMasterJob.add(getJLabel_JobReadySignal(false));
			jRunTimeMasterJob.add(getJLabel_JobReadyReceivedSignal(false));
			jRunTimeMasterJob.add(getJButton_Pause());
		}
		return jRunTimeMasterJob;
	}

	private JLabel getJLabel9() {
		if(jLabel9 == null) {
			jLabel9 = new JLabel();
			jLabel9.setText("Flusso a runtime del Master Job Server Thread");
			jLabel9.setHorizontalTextPosition(SwingConstants.CENTER);
			jLabel9.setHorizontalAlignment(SwingConstants.CENTER);
			jLabel9.setFont(new java.awt.Font("Purisa",1,16));
			jLabel9.setBounds(177, 6, 496, 26);
		}
		return jLabel9;
	}

	/**
	 * Inquiry monitor
	 * @return JPanelImage dell'inquiryMonitor
	 */
	public JPanelImage getInquiryMonitor() {
		if(sfondoInquiry == null) {		
			sfondoInquiry = new JPanelImage();
			sfondoInquiry.setSize(new java.awt.Dimension(862, 468));
			sfondoInquiry.setLayout(null);
			sfondoInquiry.setOpaque(false);
			sfondoInquiry.add(getJSeparator_30());
			sfondoInquiry.add(getJSeparator_40());
			sfondoInquiry.add(getJSeparator_50());
			sfondoInquiry.add(getJSeparator_60());
			sfondoInquiry.add(getJSeparator_70());
			sfondoInquiry.add(getJSeparator_80());
			sfondoInquiry.add(getJSeparator_90());
			sfondoInquiry.add(getJLabel_30());
			sfondoInquiry.add(getJLabel_40());
			sfondoInquiry.add(getJLabel_50());
			sfondoInquiry.add(getJLabel_60());
			sfondoInquiry.add(getJLabel_70());
			sfondoInquiry.add(getJLabel_80());
			sfondoInquiry.add(getJLabel_90());
			sfondoInquiry.add(getJLabel30());
			sfondoInquiry.setAbsolutePathImage("./media/Sfondo.png");
			getAntenna().setBounds((sfondoInquiry.getWidth()/2)-(getAntenna().getWidth()/2),0,getAntenna().getWidth(),getAntenna().getHeight());
			sfondoInquiry.add(getAntenna());
			sfondoInquiry.repaint();
		}

		return sfondoInquiry;
	}

	public JLabel getJLabel_Inquiring(boolean active) {

		if (jLabel_Inquiring==null) {
			jLabel_Inquiring = new JLabel();
			jLabel_Inquiring.setText("Inquiring");
			jLabel_Inquiring.setHorizontalAlignment(SwingConstants.CENTER);
			jLabel_Inquiring.setHorizontalTextPosition(SwingConstants.CENTER);
			jLabel_Inquiring.setBorder(BorderFactory.createTitledBorder(""));
			jLabel_Inquiring.setBounds(386, 40, 87, 27);
			jLabel_Inquiring.setFont(new java.awt.Font("AlArabiya",0,14));
			jLabel_Inquiring.setForeground(new java.awt.Color(255,255,255));
		} else {
			if (active) {
				jLabel_Inquiring.setBounds(385, 40, 95, 28);
				jLabel_Inquiring.setFont(new java.awt.Font("AlArabiya",1,14));
				jLabel_Inquiring.setForeground(new java.awt.Color(255,0,0));
			}
			else {
				jLabel_Inquiring.setBounds(386, 40, 87, 27);
				jLabel_Inquiring.setFont(new java.awt.Font("AlArabiya",0,14));
				jLabel_Inquiring.setForeground(new java.awt.Color(255,255,255));
			}
		}
		jLabel_Inquiring.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_Inquiring);
		return jLabel_Inquiring;
	}

	public ArrowLabel getJLabel10() {
		if(jLabel10 == null) {
			jLabel10 = new ArrowLabel(0);
			jLabel10.setBounds(426, 65, 32, 39);
		}
		return jLabel10;
	}

	public JLabel getJLabel_InquiryToSlave(boolean active) {
		if(jLabel_InquiryToSlave == null) {
			jLabel_InquiryToSlave = new JLabel();
			jLabel_InquiryToSlave.setText("Inquiry to Slave");
			jLabel_InquiryToSlave.setBounds(360, 107, 126, 27);
			jLabel_InquiryToSlave.setBorder(BorderFactory.createTitledBorder(""));
			jLabel_InquiryToSlave.setHorizontalAlignment(SwingConstants.CENTER);
			jLabel_InquiryToSlave.setHorizontalTextPosition(SwingConstants.CENTER);
			jLabel_InquiryToSlave.setFont(new java.awt.Font("AlArabiya",0,14));
		} else {
			if (active) {
				jLabel_InquiryToSlave.setFont(new java.awt.Font("AlArabiya",1,14));
				jLabel_InquiryToSlave.setBounds(358, 107, 144, 29);
				jLabel_InquiryToSlave.setForeground(new java.awt.Color(255,0,0));
			} else {
				jLabel_InquiryToSlave.setFont(new java.awt.Font("AlArabiya",0,14));
				jLabel_InquiryToSlave.setBounds(367, 107, 126, 27);
				jLabel_InquiryToSlave.setForeground(new java.awt.Color(255,255,255));
			}

		}
		jLabel_InquiryToSlave.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_InquiryToSlave);

		return jLabel_InquiryToSlave;
	}

	public ArrowLabel getJLabel11() {
		if(jLabel11 == null) {
			jLabel11 = new ArrowLabel(7);
			jLabel11.setBounds(495, 110, 86, 16);
		}
		return jLabel11;
	}

	public JLabel getJLabel_WaitForSlaveInquirySignal(boolean active) {
		if(jLabel_WaitForSlaveInquirySignal == null) {
			jLabel_WaitForSlaveInquirySignal = new JLabel();
			jLabel_WaitForSlaveInquirySignal.setText("Wait for okdownXml");
			jLabel_WaitForSlaveInquirySignal.setBounds(560, 108, 186, 27);
			jLabel_WaitForSlaveInquirySignal.setBorder(BorderFactory.createTitledBorder(""));
			jLabel_WaitForSlaveInquirySignal.setHorizontalAlignment(SwingConstants.CENTER);
			jLabel_WaitForSlaveInquirySignal.setHorizontalTextPosition(SwingConstants.CENTER);
			jLabel_WaitForSlaveInquirySignal.setFont(new java.awt.Font("AlArabiya",0,14));
		} else {
			if (active) {
				jLabel_WaitForSlaveInquirySignal.setFont(new java.awt.Font("AlArabiya",1,14));
				jLabel_WaitForSlaveInquirySignal.setBounds(560, 108, 198, 28);
				jLabel_WaitForSlaveInquirySignal.setForeground(new java.awt.Color(255,0,0));
			} else {
				jLabel_WaitForSlaveInquirySignal.setFont(new java.awt.Font("AlArabiya",0,14));
				jLabel_WaitForSlaveInquirySignal.setBounds(560, 108, 186, 27);
				jLabel_WaitForSlaveInquirySignal.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_WaitForSlaveInquirySignal.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_WaitForSlaveInquirySignal);

		return jLabel_WaitForSlaveInquirySignal;
	}

	public ArrowLabel getJLabel12() {
		if(jLabel12 == null) {
			jLabel12 = new ArrowLabel(9);
			jLabel12.setBounds(518, 130, 159, 41);
		}
		return jLabel12;
	}

	public JLabel getJLabel_DownloadXml(boolean active) {
		if(jLabel_DownloadXml == null) {
			jLabel_DownloadXml = new JLabel();
			jLabel_DownloadXml.setText("Downloading xml");
			jLabel_DownloadXml.setBounds(342, 144, 172, 28);
			jLabel_DownloadXml.setBorder(BorderFactory.createTitledBorder(""));
			jLabel_DownloadXml.setHorizontalAlignment(SwingConstants.CENTER);
			jLabel_DownloadXml.setHorizontalTextPosition(SwingConstants.CENTER);
			jLabel_DownloadXml.setFont(new java.awt.Font("AlArabiya",0,14));
		} else {
			if (active) {
				jLabel_DownloadXml.setBounds(336, 144, 182, 29);
				jLabel_DownloadXml.setFont(new java.awt.Font("AlArabiya",1,14));
				jLabel_DownloadXml.setForeground(new java.awt.Color(255,0,0));
			} else {
				jLabel_DownloadXml.setBounds(342, 144, 172, 28);
				jLabel_DownloadXml.setFont(new java.awt.Font("AlArabiya",0,14));
				jLabel_DownloadXml.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_DownloadXml.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_DownloadXml);

		return jLabel_DownloadXml;
	}

	private ArrowLabel getJLabel13() {
		if(jLabel13 == null) {
			jLabel13 = new ArrowLabel(0);
			jLabel13.setBounds(426, 160, 12, 62);
		}
		return jLabel13;
	}

	private ArrowLabel getJLabel14() {
		if(jLabel14 == null) {
			jLabel14 = new ArrowLabel(4);
			jLabel14.setBounds(312, 178, 153, 32);
		}
		return jLabel14;
	}

	private ArrowLabel getJLabel15() {
		if(jLabel15 == null) {
			jLabel15 = new ArrowLabel(2);
			jLabel15.setBounds(433, 178, 153, 33);
		}
		return jLabel15;
	}

	public JLabel getJLabel_Slave(boolean active) {
		if(jLabel_Slave == null) {
			jLabel_Slave = new JLabel();
			jLabel_Slave.setText("SLAVE");
			jLabel_Slave.setBounds(391, 212, 81, 26);
			jLabel_Slave.setHorizontalAlignment(SwingConstants.CENTER);
			jLabel_Slave.setHorizontalTextPosition(SwingConstants.CENTER);
			jLabel_Slave.setBorder(BorderFactory.createTitledBorder(""));
			jLabel_Slave.setFont(new java.awt.Font("AlArabiya",0,14));
		} else {
			if (active) {
				jLabel_Slave.setBounds(389, 212, 82, 27);
				jLabel_Slave.setFont(new java.awt.Font("AlArabiya",1,14));
				jLabel_Slave.setForeground(new java.awt.Color(255,0,0));
			} else {
				jLabel_Slave.setBounds(391, 212, 81, 26);
				jLabel_Slave.setFont(new java.awt.Font("AlArabiya",0,14));
				jLabel_Slave.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_Slave.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_Slave);

		return jLabel_Slave;
	}

	public JLabel getJLabel_Before(boolean active) {
		if(jLabel_Before == null) {
			jLabel_Before = new JLabel();
			jLabel_Before.setText("BEFORE");
			jLabel_Before.setBounds(258, 212, 86, 26);
			jLabel_Before.setHorizontalAlignment(SwingConstants.CENTER);
			jLabel_Before.setHorizontalTextPosition(SwingConstants.CENTER);
			jLabel_Before.setFont(new java.awt.Font("AlArabiya",0,14));
			jLabel_Before.setBorder(BorderFactory.createTitledBorder(""));
		} else {
			if (active) {
				jLabel_Before.setBounds(256, 212, 91, 27);
				jLabel_Before.setFont(new java.awt.Font("AlArabiya",1,14));
				jLabel_Before.setForeground(new java.awt.Color(255,0,0));
			} else {
				jLabel_Before.setBounds(258, 212, 86, 26);
				jLabel_Before.setFont(new java.awt.Font("AlArabiya",0,14));
				jLabel_Before.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_Before.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_Before);

		return jLabel_Before;
	}

	public JLabel getJLabel_After(boolean active) {
		if(jLabel_After == null) {
			jLabel_After = new JLabel();
			jLabel_After.setText("AFTER");
			jLabel_After.setBounds(519, 212, 79, 26);
			jLabel_After.setHorizontalAlignment(SwingConstants.CENTER);
			jLabel_After.setHorizontalTextPosition(SwingConstants.CENTER);
			jLabel_After.setBorder(BorderFactory.createTitledBorder(""));
			jLabel_After.setFont(new java.awt.Font("AlArabiya",0,14));
		} else {
			if (active) {
				jLabel_After.setBounds(516, 212, 82, 27);
				jLabel_After.setFont(new java.awt.Font("AlArabiya",1,14));
				jLabel_After.setForeground(new java.awt.Color(255,0,0));
			} else {
				jLabel_After.setBounds(519, 212, 79, 26);
				jLabel_After.setFont(new java.awt.Font("AlArabiya",0,14));
				jLabel_After.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_After.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_After);

		return jLabel_After;
	}

	public ArrowLabel getJLabel16() {
		if(jLabel16 == null) {
			jLabel16 = new ArrowLabel(3);
			jLabel16.setBounds(208, 213, 68, 36);
		}
		return jLabel16;
	}

	private ArrowLabel getJLabel17() {
		if(jLabel17 == null) {
			jLabel17 = new ArrowLabel(1);
			jLabel17.setBounds(600, 213, 68, 36);
		}
		return jLabel17;
	}

	public JLabel getJLabel_StealBefore(boolean active) {
		if(jLabel_StealBefore == null) {
			jLabel_StealBefore = new JLabel();
			jLabel_StealBefore.setText("Steal?");
			jLabel_StealBefore.setBounds(170, 245, 74, 26);
			jLabel_StealBefore.setHorizontalTextPosition(SwingConstants.CENTER);
			jLabel_StealBefore.setHorizontalAlignment(SwingConstants.CENTER);
			jLabel_StealBefore.setBorder(BorderFactory.createTitledBorder(""));
			jLabel_StealBefore.setFont(new java.awt.Font("AlArabiya",0,14));
		} else {
			if (active) {
				jLabel_StealBefore.setBounds(168, 245, 78, 27);
				jLabel_StealBefore.setFont(new java.awt.Font("AlArabiya",1,14));
				jLabel_StealBefore.setForeground(new java.awt.Color(255,0,0));
			} else {
				jLabel_StealBefore.setBounds(170, 245, 74, 26);
				jLabel_StealBefore.setFont(new java.awt.Font("AlArabiya",0,14));
				jLabel_StealBefore.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_StealBefore.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_StealBefore);

		return jLabel_StealBefore;
	}

	public JLabel getJLabel_StealAfter(boolean active) {
		if(jLabel_StealAfter == null) {
			jLabel_StealAfter = new JLabel();
			jLabel_StealAfter.setText("Steal?");
			jLabel_StealAfter.setBounds(609, 245, 74, 26);
			jLabel_StealAfter.setHorizontalAlignment(SwingConstants.CENTER);
			jLabel_StealAfter.setHorizontalTextPosition(SwingConstants.CENTER);
			jLabel_StealAfter.setBorder(BorderFactory.createTitledBorder(""));
			jLabel_StealAfter.setFont(new java.awt.Font("AlArabiya",0,14));
		} else {
			if (active) {
				jLabel_StealAfter.setBounds(607, 245, 78, 27);
				jLabel_StealAfter.setFont(new java.awt.Font("AlArabiya",1,14));
				jLabel_StealAfter.setForeground(new java.awt.Color(255,0,0));
			} else {
				jLabel_StealAfter.setBounds(609, 245, 74, 26);
				jLabel_StealAfter.setFont(new java.awt.Font("AlArabiya",0,14));
				jLabel_StealAfter.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_StealAfter.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_StealAfter);

		return jLabel_StealAfter;
	}

	private ArrowLabel getJLabel18() {
		if(jLabel18 == null) {
			jLabel18 = new ArrowLabel(8);
			jLabel18.setBounds(107, 247, 82, 16);
		}
		return jLabel18;
	}

	private ArrowLabel getJLabel19() {
		if(jLabel19 == null) {
			jLabel19 = new ArrowLabel(7);
			jLabel19.setBounds(680, 247, 82, 16);
		}
		return jLabel19;
	}

	public SemaphoreLabel getJLabel_SemaphoreBefore(int type) {	
		if (jLabel_SemaphoreBefore!=null) jRunTimeMasterJob.remove(jLabel_SemaphoreBefore);
		jLabel_SemaphoreBefore = new SemaphoreLabel(type);
		jLabel_SemaphoreBefore.setBounds(73, 230, 27, 60);
		jRunTimeMasterJob.add(jLabel_SemaphoreBefore);
		jLabel_SemaphoreBefore.repaint();
		return jLabel_SemaphoreBefore;
	}

	public SemaphoreLabel getJLabel_SemaphoreAfter(int type) {
		if (jLabel_SemaphoreAfter!=null) jRunTimeMasterJob.remove(jLabel_SemaphoreAfter);
		jLabel_SemaphoreAfter = new SemaphoreLabel(type);
		jLabel_SemaphoreAfter.setBounds(751, 231, 27, 60);
		jRunTimeMasterJob.add(jLabel_SemaphoreAfter);
		jLabel_SemaphoreAfter.repaint();
		return jLabel_SemaphoreAfter;
	}

	private ArrowLabel getJLabel20() {
		if(jLabel20 == null) {
			jLabel20 = new ArrowLabel(6);
			jLabel20.setBounds(9, 245, 61, 17);
		}
		return jLabel20;
	}

	private ArrowLabel getJLabel21() {
		if(jLabel21 == null) {
			jLabel21 = new ArrowLabel(5);
			jLabel21.setBounds(784, 245, 62, 16);
		}
		return jLabel21;
	}

	private ArrowLabel getJLabel22() {
		if(jLabel22 == null) {
			jLabel22 = new ArrowLabel(0);
			jLabel22.setBounds(207, 262, 12, 62);
		}
		return jLabel22;
	}

	private ArrowLabel getJLabel23() {
		if(jLabel23 == null) {
			jLabel23 = new ArrowLabel(0);
			jLabel23.setBounds(636, 262, 12, 62);
		}
		return jLabel23;
	}

	public JLabel getJLabel_GotBeforeTransferJob(boolean active) {
		if(jLabel_GotBeforeTransferJob == null) {
			jLabel_GotBeforeTransferJob = new JLabel();
			jLabel_GotBeforeTransferJob.setText("Got Before Job");
			jLabel_GotBeforeTransferJob.setBounds(99, 317, 180, 27);
			jLabel_GotBeforeTransferJob.setHorizontalAlignment(SwingConstants.CENTER);
			jLabel_GotBeforeTransferJob.setHorizontalTextPosition(SwingConstants.CENTER);
			jLabel_GotBeforeTransferJob.setFont(new java.awt.Font("AlArabiya",0,14));
			jLabel_GotBeforeTransferJob.setBorder(BorderFactory.createTitledBorder(""));
		} else {
			if (active) {
				jLabel_GotBeforeTransferJob.setBounds(93, 317, 187, 28);
				jLabel_GotBeforeTransferJob.setFont(new java.awt.Font("AlArabiya",1,14));
				jLabel_GotBeforeTransferJob.setForeground(new java.awt.Color(255,0,0));
			} else {
				jLabel_GotBeforeTransferJob.setBounds(99, 317, 180, 27);
				jLabel_GotBeforeTransferJob.setFont(new java.awt.Font("AlArabiya",0,14));
				jLabel_GotBeforeTransferJob.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_GotBeforeTransferJob.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_GotBeforeTransferJob);

		return jLabel_GotBeforeTransferJob;
	}

	public JLabel getJLabel_GotAfterTransferJob(boolean active) {
		if(jLabel_GotAfterTransferJob == null) {
			jLabel_GotAfterTransferJob = new JLabel();
			jLabel_GotAfterTransferJob.setText("Got After Job");
			jLabel_GotAfterTransferJob.setBounds(578, 317, 172, 27);
			jLabel_GotAfterTransferJob.setHorizontalAlignment(SwingConstants.CENTER);
			jLabel_GotAfterTransferJob.setHorizontalTextPosition(SwingConstants.CENTER);
			jLabel_GotAfterTransferJob.setBorder(BorderFactory.createTitledBorder(""));
			jLabel_GotAfterTransferJob.setFont(new java.awt.Font("AlArabiya",0,14));
		} else {
			if (active) {
				jLabel_GotAfterTransferJob.setBounds(576, 317, 178, 28);
				jLabel_GotAfterTransferJob.setFont(new java.awt.Font("AlArabiya",1,14));
				jLabel_GotAfterTransferJob.setForeground(new java.awt.Color(255,0,0));
			} else {
				jLabel_GotAfterTransferJob.setBounds(578, 317, 172, 27);
				jLabel_GotAfterTransferJob.setFont(new java.awt.Font("AlArabiya",0,14));
				jLabel_GotAfterTransferJob.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_GotAfterTransferJob.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_GotAfterTransferJob);

		return jLabel_GotAfterTransferJob;
	}

	public JLabel getJLabel_MergeXml(boolean active) {
		if(jLabel_MergeXml == null) {
			jLabel_MergeXml = new JLabel();
			jLabel_MergeXml.setText("Merge XML");
			jLabel_MergeXml.setBounds(379, 317, 102, 27);
			jLabel_MergeXml.setHorizontalAlignment(SwingConstants.CENTER);
			jLabel_MergeXml.setHorizontalTextPosition(SwingConstants.CENTER);
			jLabel_MergeXml.setBorder(BorderFactory.createTitledBorder(""));
			jLabel_MergeXml.setFont(new java.awt.Font("AlArabiya",0,14));
		} else {
			if (active) {
				jLabel_MergeXml.setBounds(374, 317, 111, 29);
				jLabel_MergeXml.setFont(new java.awt.Font("AlArabiya",1,14));
				jLabel_MergeXml.setForeground(new java.awt.Color(255,0,0));
			} else {
				jLabel_MergeXml.setBounds(379, 317, 102, 27);
				jLabel_MergeXml.setFont(new java.awt.Font("AlArabiya",0,14));
				jLabel_MergeXml.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_MergeXml.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_MergeXml);

		return jLabel_MergeXml;
	}

	public ArrowLabel getJLabel24() {
		if(jLabel24 == null) {
			jLabel24 = new ArrowLabel(10);
			jLabel24.setBounds(426, 238, 21, 75);
		}
		return jLabel24;
	}

	public ArrowLabel getJLabel25() {
		if(jLabel25 == null) {
			jLabel25 = new ArrowLabel(11);
			jLabel25.setBounds(283, 321, 91, 19);
		}
		return jLabel25;
	}

	private ArrowLabel getJLabel26() {
		if(jLabel26 == null) {
			jLabel26 = new ArrowLabel(12);
			jLabel26.setBounds(487, 321, 91, 19);
		}
		return jLabel26;
	}

	public ArrowLabel getJLabel27() {
		if(jLabel27 == null) {
			jLabel27 = new ArrowLabel(0);
			jLabel27.setBounds(426, 350, 15, 42);
		}
		return jLabel27;
	}

	public JLabel getJLabel_SendJobToSlave(boolean active) {
		if(jLabel_SendJobToSlave == null) {
			jLabel_SendJobToSlave = new JLabel();
			jLabel_SendJobToSlave.setText("Send jobs to Slave");
			jLabel_SendJobToSlave.setBounds(348, 394, 165, 27);
			jLabel_SendJobToSlave.setFont(new java.awt.Font("AlArabiya",0,14));
			jLabel_SendJobToSlave.setBorder(BorderFactory.createTitledBorder(""));
			jLabel_SendJobToSlave.setHorizontalAlignment(SwingConstants.CENTER);
			jLabel_SendJobToSlave.setHorizontalTextPosition(SwingConstants.CENTER);
		} else {
			if (active) {
				jLabel_SendJobToSlave.setBounds(344, 394, 170, 28);
				jLabel_SendJobToSlave.setFont(new java.awt.Font("AlArabiya",1,14));
				jLabel_SendJobToSlave.setForeground(new java.awt.Color(255,0,0));
			} else {
				jLabel_SendJobToSlave.setBounds(348, 394, 165, 27);
				jLabel_SendJobToSlave.setFont(new java.awt.Font("AlArabiya",0,14));
				jLabel_SendJobToSlave.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_SendJobToSlave.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_SendJobToSlave);

		return jLabel_SendJobToSlave;
	}

	private ArrowLabel getJLabel28() {
		if(jLabel28 == null) {
			jLabel28 = new ArrowLabel(7);
			jLabel28.setBounds(521, 398, 60, 16);
		}
		return jLabel28;
	}

	public JLabel getJLabel_WaitForJobReceived(boolean active) {
		if(jLabel_WaitForJobReceived == null) {
			jLabel_WaitForJobReceived = new JLabel();
			jLabel_WaitForJobReceived.setText("Wait for JobReceived");
			jLabel_WaitForJobReceived.setBounds(593, 394, 209, 27);
			jLabel_WaitForJobReceived.setBorder(BorderFactory.createTitledBorder(""));
			jLabel_WaitForJobReceived.setFont(new java.awt.Font("AlArabiya",0,14));
			jLabel_WaitForJobReceived.setHorizontalAlignment(SwingConstants.CENTER);
			jLabel_WaitForJobReceived.setHorizontalTextPosition(SwingConstants.CENTER);
		} else {
			if (active) {
				jLabel_WaitForJobReceived.setBounds(591, 394, 215, 28);
				jLabel_WaitForJobReceived.setFont(new java.awt.Font("AlArabiya",1,14));
				jLabel_WaitForJobReceived.setForeground(new java.awt.Color(255,0,0));
			} else {
				jLabel_WaitForJobReceived.setBounds(593, 394, 209, 27);
				jLabel_WaitForJobReceived.setFont(new java.awt.Font("AlArabiya",0,14));
				jLabel_WaitForJobReceived.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_WaitForJobReceived.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_WaitForJobReceived);

		return jLabel_WaitForJobReceived;
	}

	public ArrowLabel getJLabel29() {
		if(jLabel29 == null) {
			jLabel29 = new ArrowLabel(13);
			jLabel29.setBounds(467, 418, 228, 36);
		}
		return jLabel29;
	}

	public JLabel getJLabel_End(boolean active) {
		if(jLabel_End == null) {
			jLabel_End = new JLabel();
			jLabel_End.setText("END");
			jLabel_End.setBounds(391, 433, 80, 29);
			jLabel_End.setHorizontalAlignment(SwingConstants.CENTER);
			jLabel_End.setHorizontalTextPosition(SwingConstants.CENTER);
			jLabel_End.setFont(new java.awt.Font("AlArabiya",0,14));
			jLabel_End.setBorder(BorderFactory.createTitledBorder(""));
		} else {
			if (active) {
				jLabel_End.setBounds(390, 433, 81, 30);
				jLabel_End.setFont(new java.awt.Font("AlArabiya",1,14));
				jLabel_End.setForeground(new java.awt.Color(255,0,0));
			} else {
				jLabel_End.setBounds(391, 433, 80, 29);
				jLabel_End.setFont(new java.awt.Font("AlArabiya",0,14));
				jLabel_End.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_End.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_End);

		return jLabel_End;
	}

	private JLabel getJLabel_InquiryReadySignal(boolean active) {
		if(jLabel_InquiryReadySignal == null) {
			jLabel_InquiryReadySignal = new JLabel();
			jLabel_InquiryReadySignal.setText("INQUIRYREADY");
			jLabel_InquiryReadySignal.setBounds(492, 94, 82, 15);
			jLabel_InquiryReadySignal.setFont(new java.awt.Font("AlArabiya",0,9));
		} else {
			if (active) {
				jLabel_InquiryReadySignal.setBounds(491, 94, 88, 15);
				jLabel_InquiryReadySignal.setFont(new java.awt.Font("AlArabiya",1,9));
				jLabel_InquiryReadySignal.setForeground(new java.awt.Color(255,0,0));
			} else {
				jLabel_InquiryReadySignal.setBounds(492, 94, 82, 15);
				jLabel_InquiryReadySignal.setFont(new java.awt.Font("AlArabiya",0,9));
				jLabel_InquiryReadySignal.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_InquiryReadySignal.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_InquiryReadySignal);

		return jLabel_InquiryReadySignal;
	}


	private JLabel getJLabel_OkDownloadXmlSignal(boolean active) {
		if(jLabel_OkDownloadXmlSignal == null) {
			jLabel_OkDownloadXmlSignal = new JLabel();
			jLabel_OkDownloadXmlSignal.setText("OKDOWNXML");
			jLabel_OkDownloadXmlSignal.setBounds(536, 139, 92, 15);
			jLabel_OkDownloadXmlSignal.setFont(new java.awt.Font("AlArabiya",0,9));
		} else {
			if (active) {
				jLabel_OkDownloadXmlSignal.setBounds(534, 139, 97, 15);
				jLabel_OkDownloadXmlSignal.setFont(new java.awt.Font("AlArabiya",1,9));
				jLabel_OkDownloadXmlSignal.setForeground(new java.awt.Color(255,0,0));
			} else {
				jLabel_OkDownloadXmlSignal.setBounds(536, 139, 92, 15);
				jLabel_OkDownloadXmlSignal.setFont(new java.awt.Font("AlArabiya",0,9));
				jLabel_OkDownloadXmlSignal.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_OkDownloadXmlSignal.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_OkDownloadXmlSignal);

		return jLabel_OkDownloadXmlSignal;
	}

	private JLabel getJLabel_LoadBalancingSignalAfter(boolean active) {
		if(jLabel_LoadBalancingSignalAfter == null) {
			jLabel_LoadBalancingSignalAfter = new JLabel();
			jLabel_LoadBalancingSignalAfter.setText("LOADBALANCING");
			jLabel_LoadBalancingSignalAfter.setBounds(604, 207, 85, 15);
			jLabel_LoadBalancingSignalAfter.setFont(new java.awt.Font("AlArabiya",0,9));
		} else {
			if (active) {
				jLabel_LoadBalancingSignalAfter.setBounds(599, 207, 93, 16);
				jLabel_LoadBalancingSignalAfter.setFont(new java.awt.Font("AlArabiya",1,9));
				jLabel_LoadBalancingSignalAfter.setForeground(new java.awt.Color(255,0,0));
			} else {
				jLabel_LoadBalancingSignalAfter.setBounds(604, 207, 85, 15);
				jLabel_LoadBalancingSignalAfter.setFont(new java.awt.Font("AlArabiya",0,9));
				jLabel_LoadBalancingSignalAfter.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_LoadBalancingSignalAfter.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_LoadBalancingSignalAfter);

		return jLabel_LoadBalancingSignalAfter;
	}

	private JLabel getJLabel_LoadBalancingSignalBefore(boolean active) {
		if(jLabel_LoadBalancingSignalBefore == null) {
			jLabel_LoadBalancingSignalBefore = new JLabel();
			jLabel_LoadBalancingSignalBefore.setText("LOADBALANCING");
			jLabel_LoadBalancingSignalBefore.setBounds(170, 207, 79, 15);
			jLabel_LoadBalancingSignalBefore.setFont(new java.awt.Font("AlArabiya",0,9));
		} else {
			if (active) {
				jLabel_LoadBalancingSignalBefore.setBounds(163, 207, 93, 16);
				jLabel_LoadBalancingSignalBefore.setFont(new java.awt.Font("AlArabiya",1,9));
				jLabel_LoadBalancingSignalBefore.setForeground(new java.awt.Color(255,0,0));
			} else {
				jLabel_LoadBalancingSignalBefore.setBounds(170, 207, 79, 15);
				jLabel_LoadBalancingSignalBefore.setFont(new java.awt.Font("AlArabiya",0,9));
				jLabel_LoadBalancingSignalBefore.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_LoadBalancingSignalBefore.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_LoadBalancingSignalBefore);

		return jLabel_LoadBalancingSignalBefore;
	}

	private JLabel getJLabel_YesSignalBefore(boolean active) {
		if(jLabel_YesSignalBefore == null) {
			jLabel_YesSignalBefore = new JLabel();
			jLabel_YesSignalBefore.setText("YES");
			jLabel_YesSignalBefore.setBounds(124, 240, 22, 15);
			jLabel_YesSignalBefore.setFont(new java.awt.Font("AlArabiya",0,9));
		} else {
			if (active) {
				jLabel_YesSignalBefore.setBounds(123, 240, 24, 16);
				jLabel_YesSignalBefore.setFont(new java.awt.Font("AlArabiya",1,9));
				jLabel_YesSignalBefore.setForeground(new java.awt.Color(0,255,0));
			} else {
				jLabel_YesSignalBefore.setBounds(124, 240, 22, 15);
				jLabel_YesSignalBefore.setFont(new java.awt.Font("AlArabiya",0,9));
				jLabel_YesSignalBefore.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_YesSignalBefore.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_YesSignalBefore);

		return jLabel_YesSignalBefore;
	}

	private JLabel getJLabel_YesSignalAfter(boolean active) {
		if(jLabel_YesSignalAfter == null) {
			jLabel_YesSignalAfter = new JLabel();
			jLabel_YesSignalAfter.setText("YES");
			jLabel_YesSignalAfter.setBounds(707, 240, 21, 15);
			jLabel_YesSignalAfter.setFont(new java.awt.Font("AlArabiya",0,9));
		} else {
			if (active) {
				jLabel_YesSignalAfter.setBounds(706, 240, 23, 16);
				jLabel_YesSignalAfter.setFont(new java.awt.Font("AlArabiya",1,9));
				jLabel_YesSignalAfter.setForeground(new java.awt.Color(0,255,0));
			} else {
				jLabel_YesSignalAfter.setBounds(707, 240, 21, 15);
				jLabel_YesSignalAfter.setFont(new java.awt.Font("AlArabiya",0,9));
				jLabel_YesSignalAfter.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_YesSignalAfter.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_YesSignalAfter);

		return jLabel_YesSignalAfter;
	}

	private ArrowLabel getJLabel36() {
		if(jLabel36 == null) {
			jLabel36 = new ArrowLabel(5);
			jLabel36.setBounds(20, 321, 80, 19);
		}
		return jLabel36;
	}

	private ArrowLabel getJLabel37() {
		if(jLabel37 == null) {
			jLabel37 = new ArrowLabel(6);
			jLabel37.setBounds(756, 321, 86, 19);
		}
		return jLabel37;
	}

	private JLabel getJLabel_NoSignalBefore(boolean active) {
		if(jLabel_NoSignalBefore == null) {
			jLabel_NoSignalBefore = new JLabel();
			jLabel_NoSignalBefore.setText("NO");
			jLabel_NoSignalBefore.setBounds(222, 283, 18, 15);
			jLabel_NoSignalBefore.setFont(new java.awt.Font("AlArabiya",0,9));
		} else {
			if (active) {
				jLabel_NoSignalBefore.setBounds(220, 283, 20, 16);
				jLabel_NoSignalBefore.setFont(new java.awt.Font("AlArabiya",1,9));
				jLabel_NoSignalBefore.setForeground(new java.awt.Color(0,0,255));
			} else {
				jLabel_NoSignalBefore.setBounds(222, 283, 18, 15);
				jLabel_NoSignalBefore.setFont(new java.awt.Font("AlArabiya",0,9));
				jLabel_NoSignalBefore.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_NoSignalBefore.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_NoSignalBefore);

		return jLabel_NoSignalBefore;
	}

	private JLabel getJLabel_NoSignalAfter(boolean active) {
		if(jLabel_NoSignalAfter == null) {
			jLabel_NoSignalAfter = new JLabel();
			jLabel_NoSignalAfter.setText("NO");
			jLabel_NoSignalAfter.setBounds(620, 283, 18, 15);
			jLabel_NoSignalAfter.setFont(new java.awt.Font("AlArabiya",0,9));
		} else {
			if (active) {
				jLabel_NoSignalAfter.setBounds(618, 283, 20, 16);
				jLabel_NoSignalAfter.setFont(new java.awt.Font("AlArabiya",1,9));
				jLabel_NoSignalAfter.setForeground(new java.awt.Color(0,0,255));
			} else {
				jLabel_NoSignalAfter.setBounds(620, 283, 18, 15);
				jLabel_NoSignalAfter.setFont(new java.awt.Font("AlArabiya",0,9));
				jLabel_NoSignalAfter.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_NoSignalAfter.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_NoSignalAfter);

		return jLabel_NoSignalAfter;
	}

	private JLabel getJLabel_JobReadySignal(boolean active) {
		if(jLabel_JobReadySignal == null) {
			jLabel_JobReadySignal = new JLabel();
			jLabel_JobReadySignal.setText("JOBREADY");
			jLabel_JobReadySignal.setBounds(527, 394, 60, 10);
			jLabel_JobReadySignal.setFont(new java.awt.Font("AlArabiya",0,9));
		} else {
			if (active) {
				jLabel_JobReadySignal.setBounds(525, 394, 64, 11);
				jLabel_JobReadySignal.setFont(new java.awt.Font("AlArabiya",1,9));
				jLabel_JobReadySignal.setForeground(new java.awt.Color(255,0,0));
			} else {
				jLabel_JobReadySignal.setBounds(527, 394, 60, 10);
				jLabel_JobReadySignal.setFont(new java.awt.Font("AlArabiya",0,9));
				jLabel_JobReadySignal.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_JobReadySignal.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_JobReadySignal);

		return jLabel_JobReadySignal;
	}

	private JLabel getJLabel_JobReadyReceivedSignal(boolean active) {
		if(jLabel_JobReadyReceivedSignal == null) {
			jLabel_JobReadyReceivedSignal = new JLabel();
			jLabel_JobReadyReceivedSignal.setText("JOBREADYRECEIVED");
			jLabel_JobReadyReceivedSignal.setBounds(521, 433, 99, 11);
			jLabel_JobReadyReceivedSignal.setFont(new java.awt.Font("AlArabiya",0,9));
		} else {
			if (active) {
				jLabel_JobReadyReceivedSignal.setBounds(515, 433, 115, 12);
				jLabel_JobReadyReceivedSignal.setFont(new java.awt.Font("AlArabiya",1,9));
				jLabel_JobReadyReceivedSignal.setForeground(new java.awt.Color(255,0,0));
			} else {
				jLabel_JobReadyReceivedSignal.setBounds(521, 433, 99, 11);
				jLabel_JobReadyReceivedSignal.setFont(new java.awt.Font("AlArabiya",0,9));
				jLabel_JobReadyReceivedSignal.setForeground(new java.awt.Color(255,255,255));
			}
		}

		jLabel_JobReadyReceivedSignal.setEnabled(active);
		jRunTimeMasterJob.add(jLabel_JobReadyReceivedSignal);

		return jLabel_JobReadyReceivedSignal;
	}

	public MyConnectionLabel getAntenna() {
		if(antenna == null) {
			antenna = new MyConnectionLabel(4);
			antenna.setSize(100, 100);
			antenna.repaint();
			antenna.setVisible(true);
		}
		return antenna;
	}

	public class MyConnectionLabel extends JLabel {
		/**
		 * Classe che estende JLabel ed ha nel costruttore le immagini del mondo connesso/disconnesso
		 */
		private static final long serialVersionUID = 291591054362076606L;
		private ImageIcon[] icone;
		private int tipo;

		public MyConnectionLabel(int tipo) {
			icone = new ImageIcon[5];
			icone[0] = new ImageIcon("./media/Disconnected.png");
			icone[1] = new ImageIcon("./media/Connected.png");
			icone[2] = new ImageIcon("./media/Disconnected_small.png");
			icone[3] = new ImageIcon("./media/Connected_small.png");
			icone[4] = new ImageIcon("./media/antenna_small.png");
			setTipo(tipo);
		}

		public void setTipo(int tipo) {
			setIcon(icone[tipo]);
			this.tipo = tipo;
		}

		public int getTipo() { 
			return tipo;
		}
	}

	public class ArrowLabel extends JLabel {
		/**
		 * Label per l'inserimento di immagini di tipo "freccia"
		 */
		private static final long serialVersionUID = -3453853796339235645L;

		private ImageIcon[] icone;
		private int tipo;

		public ArrowLabel(int tipo) {
			icone = new ImageIcon[14];
			icone[0] = new ImageIcon("./media/Down_small.png");
			icone[1] = new ImageIcon("./media/Right_down.png");
			icone[2] = new ImageIcon("./media/Right_down_long.png");
			icone[3] = new ImageIcon("./media/Left_down.png");
			icone[4] = new ImageIcon("./media/Left_down_long.png");
			icone[5] = new ImageIcon("./media/Right_tratt.png");
			icone[6] = new ImageIcon("./media/Left_tratt.png");
			icone[7] = new ImageIcon("./media/Right_small.png");
			icone[8] = new ImageIcon("./media/Left_small.png");
			icone[9] = new ImageIcon("./media/Down_left_long.png");
			icone[10] = new ImageIcon("./media/Down_small_long.png");
			icone[11] = new ImageIcon("./media/Right_small_long.png");
			icone[12] = new ImageIcon("./media/Left_small_long.png");
			icone[13] = new ImageIcon("./media/Down_left_very_long.png");
			setTipo(tipo);
		}

		public void setTipo(int tipo) {
			setIcon(icone[tipo]);
			this.tipo = tipo;
		}

		public int getTipo() { 
			return tipo;
		}
	}

	public class SemaphoreLabel extends JLabel {


		/**
		 * 
		 */
		private static final long serialVersionUID = -5065960404999574692L;
		private ImageIcon[] icone;
		private int tipo;

		public SemaphoreLabel(int tipo) {
			icone = new ImageIcon[3];
			icone[0] = new ImageIcon("./media/Semaphore_red.png");
			icone[1] = new ImageIcon("./media/Semaphore_yellow.png");
			icone[2] = new ImageIcon("./media/Semaphore_green.png");
			setTipo(tipo);
		}

		public void setTipo(int tipo) {
			setIcon(icone[tipo]);
			this.tipo = tipo;
		}

		public int getTipo() { 
			return tipo;
		}
	}

	/**
	 * metodo per aggiungere client da inquiry
	 */
	public void addClient() {

		//Estraggo larghezza pannello contenitore
		int panelWidth = getInquiryMonitor().getWidth();

		/**
		 * Estraggo i mac ed rssi da inquiryTmp.txt
		 */
		int numClients = 0;
		StringTokenizer st = null;
		String delim = ":";
		boolean moreLines = true;	
		BufferedReader in = null;
		try {
			in = new BufferedReader(new FileReader("./gatewayTmp/inquiryTmp.txt"));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}

		//inizializzazione clientsDetected
		if (clientsDetected==null) clientsDetected = new Vector<ClientDetected>();
		else {
			for (int i=0; i<clientsDetected.size(); i++) {
				//Pulisco i clientPanels dai vecchi clientsDetected
				getInquiryMonitor().remove(clientsDetected.elementAt(i));
				getInquiryMonitor().repaint();
			}
			//resetto il vettore
			clientsDetected.clear();
		}


		Vector<String> macFound = new Vector<String>();
		Vector<String> rssiFound = new Vector<String>();

		System.out.println("___________________");
		System.out.println("");
		System.out.println("    inquiry.txt    ");
		System.out.println("___________________");
		System.out.println("");

		while (moreLines) {
			//estrazione della linea
			String linea = LineUtility.getNextLine(in);

			if (linea.equals("Nessuna linea disponibile")) { 
				moreLines = false;
				break; //esco dal ciclo
			} else numClients++;

			st = new StringTokenizer(linea);
			while(st.hasMoreTokens()){
				try{
					String mac = st.nextToken(delim);	
					String rssi = st.nextToken(delim);
					System.out.println(" "+mac+" @ "+rssi);
					macFound.add(numClients-1,mac);
					rssiFound.add(numClients-1,rssi);
				}catch(NoSuchElementException e) {
					continue;	
				}

			}//fine while(hasMoreTokens())	

		}//fine while(moreLines)

		try {
			in.close();
		} catch (IOException e1) {
			e1.printStackTrace();
		}

		System.out.println("___________________");

		/**
		 * Per ogni sezione del pannello (larga panelWidth) devo aggiungere un elemento grafico "Client"
		 * Potrei calcolare il numero totale di client rilevati ed assegnare ad ognuno una "fetta" del JPanel
		 */

		for (int i=0; i<macFound.size(); i++) {

			try {

				int x=(i*(panelWidth/numClients)+(panelWidth/numClients/2)-69);
				ClientDetected clientDetectedTmp = new ClientDetected(macFound.elementAt(i),rssiFound.elementAt(i),x);
				clientsDetected.add(i,clientDetectedTmp);
				clientsDetected.elementAt(i).repaint();
				clientsDetected.elementAt(i).validate();

				getInquiryMonitor().add(clientsDetected.elementAt(i));
				getInquiryMonitor().setComponentZOrder(clientsDetected.elementAt(i), 0);

				getInquiryMonitor().repaint();
			} catch (Exception e) {
				e.printStackTrace();
			}

		}

		getInquiryMonitor().repaint();



	}//fine addClient


	class ClientDetected extends JPanelImage {

		/**
		 * Pannello rappresentante un client rilevato dall'inquiry
		 */
		private static final long serialVersionUID = 2257762040895392383L;

		int rssiTmp;
		int y;

		public ClientDetected (String mac, String rssi, int x) {

			this.setLayout(null);
			rssiTmp=Integer.parseInt(rssi);
			y=rssiTmp+(3*rssiTmp);
			this.setBounds(x, y, 95,110);
			this.setBorder(BorderFactory.createTitledBorder(""));
			this.setAbsolutePathImage("./media/client_detected.png");

			//Stringa mac in alto al centro
			JLabel macLabel = new JLabel();
			macLabel.setText(mac);
			macLabel.setBounds(3,0,90,13);
			macLabel.setFont(new java.awt.Font("AlArabiya",1,9));
			macLabel.setForeground(new java.awt.Color(0,0,250));
			macLabel.setHorizontalTextPosition(SwingConstants.CENTER);
			macLabel.setHorizontalAlignment(SwingConstants.CENTER);
			macLabel.setVerticalAlignment(SwingConstants.TOP);
			macLabel.setVisible(true);
			this.add(macLabel);
			macLabel.repaint();

			//Stringa rssi in basso al centro
			JLabel rssiLabel = new JLabel();
			rssiLabel.setText("rssi: "+rssi);
			rssiLabel.setBounds(3,15,90,13);
			rssiLabel.setFont(new java.awt.Font("AlArabiya",2,10));
			rssiLabel.setForeground(new java.awt.Color(250,0,0));
			rssiLabel.setHorizontalTextPosition(SwingConstants.CENTER);
			rssiLabel.setVerticalTextPosition(SwingConstants.CENTER);
			rssiLabel.setHorizontalAlignment(SwingConstants.CENTER);
			rssiLabel.setVerticalAlignment(SwingConstants.BOTTOM);
			rssiLabel.setVisible(true);
			this.add(rssiLabel);
			rssiLabel.repaint();

		}

	}//fine ClientDetected

	public JSeparator getJSeparator_30() {
		if(jSeparator_30 == null) {
			jSeparator_30 = new JSeparator();
			jSeparator_30.setBounds(66, 30+(30*3), 747, 10);
		}
		return jSeparator_30;
	}

	public JSeparator getJSeparator_40() {
		if(jSeparator_40 == null) {
			jSeparator_40 = new JSeparator();
			jSeparator_40.setBounds(66, 40+(40*3), 747, 10);
		}
		return jSeparator_40;
	}

	public JSeparator getJSeparator_50() {
		if(jSeparator_50 == null) {
			jSeparator_50 = new JSeparator();
			jSeparator_50.setBounds(66, 50+(50*3), 747, 10);
		}
		return jSeparator_50;
	}

	public JSeparator getJSeparator_60() {
		if(jSeparator_60 == null) {
			jSeparator_60 = new JSeparator();
			jSeparator_60.setBounds(66, 60+(60*3), 747, 10);
		}
		return jSeparator_60;
	}

	public JSeparator getJSeparator_70() {
		if(jSeparator_70 == null) {
			jSeparator_70 = new JSeparator();
			jSeparator_70.setBounds(66, 70+(70*3), 747, 10);
		}
		return jSeparator_70;
	}

	public JSeparator getJSeparator_80() {
		if(jSeparator_80 == null) {
			jSeparator_80 = new JSeparator();
			jSeparator_80.setBounds(66, 80+(80*3), 747, 10);
		}
		return jSeparator_80;
	}

	public JSeparator getJSeparator_90() {
		if(jSeparator_90 == null) {
			jSeparator_90 = new JSeparator();
			jSeparator_90.setBounds(66, 90+(90*3), 747, 10);
		}
		return jSeparator_90;
	}

	public JLabel getJLabel_30() {
		if(jLabel_30 == null) {
			jLabel_30 = new JLabel();
			jLabel_30.setText("30");
			jLabel_30.setBounds(23, 25+(30*3), 16, 15);
			jLabel_30.setFont(new java.awt.Font("AlArabiya",0,12));
			jLabel_30.setEnabled(false);
		}
		return jLabel_30;
	}

	public JLabel getJLabel_40() {
		if(jLabel_40 == null) {
			jLabel_40 = new JLabel();
			jLabel_40.setText("40");
			jLabel_40.setBounds(23, (35+40*3), 16, 15);
			jLabel_40.setFont(new java.awt.Font("AlArabiya",0,12));
			jLabel_40.setEnabled(false);
		}
		return jLabel_40;
	}

	public JLabel getJLabel_50() {
		if(jLabel_50 == null) {
			jLabel_50 = new JLabel();
			jLabel_50.setText("50");
			jLabel_50.setBounds(23, 45+(50*3), 16, 15);
			jLabel_50.setEnabled(false);
			jLabel_50.setFont(new java.awt.Font("AlArabiya",0,12));
		}
		return jLabel_50;
	}

	public JLabel getJLabel_60() {
		if(jLabel_60 == null) {
			jLabel_60 = new JLabel();
			jLabel_60.setText("60");
			jLabel_60.setBounds(23, 55+(60*3), 16, 15);
			jLabel_60.setEnabled(false);
			jLabel_60.setFont(new java.awt.Font("AlArabiya",0,12));
		}
		return jLabel_60;
	}

	public JLabel getJLabel_70() {
		if(jLabel_70 == null) {
			jLabel_70 = new JLabel();
			jLabel_70.setText("70");
			jLabel_70.setBounds(23, 65+(70*3), 16, 15);
			jLabel_70.setEnabled(false);
			jLabel_70.setFont(new java.awt.Font("AlArabiya",0,12));
		}
		return jLabel_70;
	}

	public JLabel getJLabel_80() {
		if(jLabel_80 == null) {
			jLabel_80 = new JLabel();
			jLabel_80.setText("80");
			jLabel_80.setBounds(23, 75+(80*3), 16, 15);
			jLabel_80.setEnabled(false);
			jLabel_80.setFont(new java.awt.Font("AlArabiya",0,12));
		}
		return jLabel_80;
	}

	public JLabel getJLabel_90() {
		if(jLabel_90 == null) {
			jLabel_90 = new JLabel();
			jLabel_90.setText("90");
			jLabel_90.setBounds(23, 85+(90*3), 16, 15);
			jLabel_90.setEnabled(false);
			jLabel_90.setFont(new java.awt.Font("AlArabiya",0,12));
		}
		return jLabel_90;
	}

	public JLabel getJLabel30() {
		if(jLabel30 == null) {
			jLabel30 = new JLabel();
			jLabel30.setText("Rssi");
			jLabel30.setBounds(18, 16, 33, 15);
			jLabel30.setEnabled(false);
			jLabel30.setFont(new java.awt.Font("AlArabiya",1,12));
		}
		return jLabel30;
	}

	public void readJobXml(){
		try{
			if(init){
				jobXml = new RSyntaxTextArea();
				jobXml.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
				jobXml.setText("waiting job..");
				RSyntaxTextArea.setTemplatesEnabled(true);	
				jTabbedPane1.addTab("job.xml",jobXml);
				init=false;
			}
			Reader reader = new FileReader("./gatewayTmp/job.xml");
			jobXml.read(reader, null);
			jobXml.repaint();
			reader.close();
		}
		catch(Exception e){	
			e.printStackTrace();		
		}

	}

	public void readLocalXml(){
		try{
			if(firstTime_LocalXml){
				localXml = new RSyntaxTextArea();
				localXml.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
				localXml.setText("waiting gateway.xml..");
				RSyntaxTextArea.setTemplatesEnabled(true);	
				jScrollPane7.setViewportView(localXml);
				localXml.setPreferredSize(new java.awt.Dimension(575, 657));
				firstTime_LocalXml=false;
			}
			else {
				Reader reader = new FileReader("./gatewayTmp/gateway.xml");
				localXml.read(reader, null);
				reader.close();
			}
			localXml.repaint();
		}
		catch(Exception e){	
			e.printStackTrace();		
		}
	}

	public void readBeforeXml(){
		try{
			if(firstTime_BeforeXml){
				beforeXml = new RSyntaxTextArea();
				beforeXml.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
				beforeXml.setText("waiting before_gateway.xml..");
				RSyntaxTextArea.setTemplatesEnabled(true);	
				jScrollPane8.setViewportView(beforeXml);
				beforeXml.setPreferredSize(new java.awt.Dimension(575, 657));
				firstTime_BeforeXml=false;
			}
			else {
				Reader reader = new FileReader("./gatewayTmp/before_gateway.xml");
				beforeXml.read(reader, null);
				reader.close();
			}
			beforeXml.repaint();
		}
		catch(Exception e){	
			e.printStackTrace();		
		}
	}

	public void readAfterXml(){
		try{
			if(firstTime_AfterXml){
				afterXml = new RSyntaxTextArea();
				afterXml.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
				afterXml.setText("waiting after_gateway.xml..");
				RSyntaxTextArea.setTemplatesEnabled(true);	
				jScrollPane9.setViewportView(afterXml);
				afterXml.setPreferredSize(new java.awt.Dimension(575, 657));
				firstTime_AfterXml=false;
			}
			else {
				Reader reader = new FileReader("./gatewayTmp/after_gateway.xml");
				afterXml.read(reader, null);
				reader.close();
			}
			afterXml.repaint();
		}
		catch(Exception e){	
			e.printStackTrace();		
		}
	}

	public JButton getJButton_Pause() {
		if(jButton_Pause == null) {
			jButton_Pause = new JButton();
			jButton_Pause.setText("Run");
			jButton_Pause.setBounds(62, 67, 120, 53);
			jButton_Pause.setFont(new java.awt.Font("AlArabiya",1,12));
			jButton_Pause.setIcon(new ImageIcon("./media/play.png"));
			jButton_Pause.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent evt) {
					jButton_PauseActionPerformed(evt);
				}
			});
		}
		return jButton_Pause;
	}

	private void jButton_PauseActionPerformed(ActionEvent evt) {
		if (run==true) {
			run=false;
			jButton_Pause.setIcon(new ImageIcon("./media/play.png"));
			jButton_Pause.setText("Run");
		}
		else {
			run=true;
			jButton_Pause.setIcon(new ImageIcon("./media/pause.png"));
			jButton_Pause.setText("Pause");
		}
		jButton_Pause.repaint();
		if (run==true) {
			try {
				synchronized (getMaster().getMasterJobServer().getRunSemaphore()) {
					getMaster().getMasterJobServer().getRunSemaphore().notify();
				}
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		getMaster().getMasterJobServer().setRun(run);
	}

	public JMenuBar getJMenuBar1() {
		return jMenuBar1;
	}

	private JMenu getJMenu1() {
		if(jMenu1 == null) {
			jMenu1 = new JMenu();
			jMenu1.setText("Info");
			jMenu1.setEnabled(true);
			jMenu1.add(getJMenuItem_IL());
		}
		return jMenu1;
	}

	private JMenuItem getJMenuItem_IL() {
		if(jMenuItem_IL == null) {
			jMenuItem_IL = new JMenuItem("Project Team");
			jMenuItem_IL.setText("Project Team");
			jMenuItem_IL.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					ImageIcon icon = new ImageIcon("./media/sid_small.png");
					JOptionPane.showMessageDialog(jMenuItem_IL,
							"BRADiPO Team Project:\n\nRoberto Coluccio\nAlex Di Mango\nPrimiano Ciavarella",
							"BRADiPO Team Project",
							JOptionPane.INFORMATION_MESSAGE,
							icon);
				}
			});
		}
		return jMenuItem_IL;
	}

	public JPanel getJHotSetting() {
		if(jHotSetting == null) {
			jHotSetting = new JPanel();
			jHotSetting.add(getJPanelImage_LogoMaster());
			jHotSetting.add(getJLabel31());
			jHotSetting.add(getJPanel7());
			jHotSetting.add(getJPanel8());
		}
		return jHotSetting;
	}

	public JPanelImage getJPanelImage_LogoMaster() {
		if(jPanelImage_LogoMaster == null) {
			jPanelImage_LogoMaster = new JPanelImage();
			jPanelImage_LogoMaster.setAbsolutePathImage("./media/master.png");
			jPanelImage_LogoMaster.setPreferredSize(new java.awt.Dimension(538, 123));
		}
		return jPanelImage_LogoMaster;
	}

	private JLabel getJLabel31() {
		if(jLabel31 == null) {
			jLabel31 = new JLabel();
			jLabel31.setText("SETTAGGIO \"A CALDO\" PARAMETRI ");
			jLabel31.setPreferredSize(new java.awt.Dimension(716, 34));
			jLabel31.setHorizontalAlignment(SwingConstants.CENTER);
			jLabel31.setFont(new java.awt.Font("AlArabiya",1,14));
		}
		return jLabel31;
	}

	public JPanel getJPanel7() {
		if(jPanel7 == null) {
			jPanel7 = new JPanel();
			jPanel7.setPreferredSize(new java.awt.Dimension(503, 247));
			jPanel7.setBorder(BorderFactory.createTitledBorder(""));
			jPanel7.setLayout(null);
			jPanel7.add(getJSlider_RssiThresholding());
			jPanel7.add(getJSlider_maxPACKET());
			jPanel7.add(getJSlider_maxTime());
			jPanel7.add(getJInquiryRSSIThresholding());
			jPanel7.add(getJInquirymaxPACKET());
			jPanel7.add(getJInquirymaxTIME());
			jPanel7.add(getJLabel34());
			jPanel7.add(getJLabel33());
			jPanel7.add(getJLabel32());
		}
		return jPanel7;
	}

	public JButton getJButton_Update() {
		if(jButton_Update == null) {
			jButton_Update = new JButton();
			jButton_Update.setText("UPDATE");
			ImageIcon updateLogo = new ImageIcon("./media/refresh.png");
			jButton_Update.setIcon(updateLogo);
			jButton_Update.setPreferredSize(new java.awt.Dimension(129, 47));
			jButton_Update.setFont(new java.awt.Font("AlArabiya",1,14));
			jButton_Update.addMouseListener(new MouseAdapter() {
				public void mouseClicked(MouseEvent evt) {
					jButton_UpdateMouseClicked(evt);
				}
			});
		}
		return jButton_Update;
	}

	private JLabel getJLabel32() {
		if(jLabel32 == null) {
			jLabel32 = new JLabel();
			GroupLayout jLabel32Layout = new GroupLayout((JComponent)jLabel32);
			jLabel32.setLayout(jLabel32Layout);
			jLabel32.setText("Inquiry RSSI Thresholding");
			jLabel32.setBounds(25, 184, 195, 27);
			jLabel32.setFont(new java.awt.Font("AlArabiya",3,14));
			jLabel32Layout.setVerticalGroup(jLabel32Layout.createSequentialGroup());
			jLabel32Layout.setHorizontalGroup(jLabel32Layout.createSequentialGroup());
		}
		return jLabel32;
	}

	public JTextField getJInquiryRSSIThresholding() {
		if(jInquiryRSSIThresholding == null) {
			jInquiryRSSIThresholding = new JTextField();
			GroupLayout jInquiryRSSIThresholdingLayout = new GroupLayout((JComponent)jInquiryRSSIThresholding);
			jInquiryRSSIThresholding.setLayout(jInquiryRSSIThresholdingLayout);
			jInquiryRSSIThresholding.setText(""+getJSlider_RssiThresholding().getValue());
			jInquiryRSSIThresholding.setBounds(226, 178, 32, 39);
			jInquiryRSSIThresholding.setHorizontalAlignment(SwingConstants.CENTER);
			jInquiryRSSIThresholding.setFont(new java.awt.Font("AlArabiya",1,14));
			jInquiryRSSIThresholdingLayout.setVerticalGroup(jInquiryRSSIThresholdingLayout.createSequentialGroup());
			jInquiryRSSIThresholdingLayout.setHorizontalGroup(jInquiryRSSIThresholdingLayout.createSequentialGroup());
			jInquiryRSSIThresholding.setEditable(false);
		}
		return jInquiryRSSIThresholding;
	}

	private JLabel getJLabel33() {
		if(jLabel33 == null) {
			jLabel33 = new JLabel();
			jLabel33.setLayout(null);
			jLabel33.setText("Inquiry max PACKET");
			jLabel33.setBounds(63, 111, 152, 27);
			jLabel33.setFont(new java.awt.Font("AlArabiya",3,14));
		}
		return jLabel33;
	}

	public JTextField getJInquirymaxPACKET() {
		if(jInquirymaxPACKET == null) {
			jInquirymaxPACKET = new JTextField();
			jInquirymaxPACKET.setLayout(null);
			jInquirymaxPACKET.setText(""+getJSlider_maxPACKET().getValue());
			jInquirymaxPACKET.setBounds(226, 105, 32, 39);
			jInquirymaxPACKET.setFont(new java.awt.Font("AlArabiya",1,14));
			jInquirymaxPACKET.setHorizontalAlignment(SwingConstants.CENTER);
			jInquirymaxPACKET.setEditable(false);
		}
		return jInquirymaxPACKET;
	}

	private JLabel getJLabel34() {
		if(jLabel34 == null) {
			jLabel34 = new JLabel();
			jLabel34.setLayout(null);
			jLabel34.setText("Inquiry max TIME");
			jLabel34.setBounds(85, 32, 131, 27);
			jLabel34.setFont(new java.awt.Font("AlArabiya",3,14));
		}
		return jLabel34;
	}

	public JTextField getJInquirymaxTIME() {
		if(jInquirymaxTIME == null) {
			jInquirymaxTIME = new JTextField();
			jInquirymaxTIME.setLayout(null);
			jInquirymaxTIME.setText(""+getJSlider_maxTime().getValue());
			jInquirymaxTIME.setBounds(226, 27, 32, 39);
			jInquirymaxTIME.setFont(new java.awt.Font("AlArabiya",1,14));
			jInquirymaxTIME.setHorizontalAlignment(SwingConstants.CENTER);
			jInquirymaxTIME.setEditable(false);
		}
		return jInquirymaxTIME;
	}

	public JPanel getJPanel8() {
		if(jPanel8 == null) {
			jPanel8 = new JPanel();
			jPanel8.setPreferredSize(new java.awt.Dimension(278, 288));
			jPanel8.add(getJLabel35());
			jPanel8.add(getJLabelEmpty());
			jPanel8.add(getJButton_Update());
		}
		return jPanel8;
	}

	public JSlider getJSlider_maxTime() {
		if(jSlider_maxTime == null) {
			jSlider_maxTime = new JSlider();
			jSlider_maxTime.setMajorTickSpacing(10);
			jSlider_maxTime.setMinorTickSpacing(1);
			jSlider_maxTime.setMaximum(51);
			jSlider_maxTime.setMinimum(1);
			jSlider_maxTime.setValue(master.getInquiryMaxTime());
			jSlider_maxTime.setPaintTrack(true);
			jSlider_maxTime.setPaintTicks(true);
			jSlider_maxTime.setPaintLabels(true);
			jSlider_maxTime.setLayout(null);
			jSlider_maxTime.setBounds(272, 10, 200, 71);
			jSlider_maxTime.addChangeListener(new ChangeListener(){
				public void stateChanged(ChangeEvent e) {
					getJInquirymaxTIME().setText(String.valueOf(jSlider_maxTime.getValue()));
				}
			});
		}
		return jSlider_maxTime;
	}

	public JSlider getJSlider_maxPACKET() {
		if(jSlider_maxPACKET == null) {
			jSlider_maxPACKET = new JSlider();
			jSlider_maxPACKET.setLayout(null);
			jSlider_maxPACKET.setBounds(272, 97, 200, 57);
			jSlider_maxPACKET.setMajorTickSpacing(5);
			jSlider_maxPACKET.setMinorTickSpacing(1);
			jSlider_maxPACKET.setMaximum(31);
			jSlider_maxPACKET.setMinimum(1);
			jSlider_maxPACKET.setValue(master.getInquiryMaxPacket());
			jSlider_maxPACKET.setPaintTrack(true);
			jSlider_maxPACKET.setPaintTicks(true);
			jSlider_maxPACKET.setPaintLabels(true);
			jSlider_maxPACKET.addChangeListener(new ChangeListener(){
				public void stateChanged(ChangeEvent e) {
					getJInquirymaxPACKET().setText(String.valueOf(jSlider_maxPACKET.getValue()));
				}
			});
		}
		return jSlider_maxPACKET;
	}

	public JSlider getJSlider_RssiThresholding() {
		if(jSlider_RssiThresholding == null) {
			jSlider_RssiThresholding = new JSlider();
			GroupLayout jSlider_RssiThresholdingLayout = new GroupLayout((JComponent)jSlider_RssiThresholding);
			jSlider_RssiThresholding.setLayout(jSlider_RssiThresholdingLayout);
			jSlider_RssiThresholding.setBounds(272, 169, 200, 59);
			jSlider_RssiThresholding.setMajorTickSpacing(15);
			jSlider_RssiThresholding.setMinorTickSpacing(5);
			jSlider_RssiThresholding.setMaximum(95);
			jSlider_RssiThresholding.setMinimum(35);
			jSlider_RssiThresholding.setValue(master.getInquiryThresholding());
			jSlider_RssiThresholding.setPaintTrack(true);
			jSlider_RssiThresholding.setPaintTicks(true);
			jSlider_RssiThresholding.setPaintLabels(true);
			jSlider_RssiThresholdingLayout.setVerticalGroup(jSlider_RssiThresholdingLayout.createSequentialGroup());
			jSlider_RssiThresholdingLayout.setHorizontalGroup(jSlider_RssiThresholdingLayout.createSequentialGroup());
			jSlider_RssiThresholding.addChangeListener(new ChangeListener(){
				public void stateChanged(ChangeEvent e) {
					getJInquiryRSSIThresholding().setText(String.valueOf(jSlider_RssiThresholding.getValue()));
				}
			});
		}
		return jSlider_RssiThresholding;
	}

	private JLabel getJLabel35() {
		if(jLabel35 == null) {
			jLabel35 = new JLabel();
			ImageIcon potenziometro = new ImageIcon("./media/potenziometro.png");
			jLabel35.setIcon(potenziometro);
			jLabel35.setPreferredSize(new java.awt.Dimension(256, 186));
		}
		return jLabel35;
	}

	private JLabel getJLabelEmpty() {
		if(jLabelEmpty == null) {
			jLabelEmpty = new JLabel();
			jLabelEmpty.setPreferredSize(new java.awt.Dimension(240, 15));
		}
		return jLabelEmpty;
	}

	private void jButton_UpdateMouseClicked(MouseEvent evt) {
		synchronized(masterJobServerThread.getInquiryValuesSemaphore()) {
			masterJobServerThread.setInquiryMaxTime(Integer.parseInt(getJInquirymaxTIME().getText()));
			masterJobServerThread.setInquiryMaxPacket(Integer.parseInt(getJInquirymaxPACKET().getText()));
			masterJobServerThread.setInquiryThresholding(Integer.parseInt(getJInquiryRSSIThresholding().getText()));
		}
	}

	private JTabbedPane getJTabbedPane2() {
		if(jTabbedPane2 == null) {
			jTabbedPane2 = new JTabbedPane();
			{
				jScrollPane4 = new JScrollPane();
				jTabbedPane2.addTab("Master Job events console", null, jScrollPane4, null);
				jTabbedPane2.addTab("Gateway status",null,getJScrollPane7(),null);
				jTabbedPane2.setPreferredSize(new java.awt.Dimension(587, 262));
				jTabbedPane2.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null));
				jScrollPane4.setPreferredSize(new java.awt.Dimension(581, 216));
				{
					jConsoleEventiTextArea = new JTextArea();
					jScrollPane4.setViewportView(jConsoleEventiTextArea);
					jConsoleEventiTextArea.setEditable(false);
					jConsoleEventiTextArea.setPreferredSize(new java.awt.Dimension(850, 9535));							
				}
			}
		}
		return jTabbedPane2;
	}

	public JScrollPane getJScrollPane7() {
		if(jScrollPane7 == null) {
			jScrollPane7 = new JScrollPane();
			jScrollPane7.setPreferredSize(new java.awt.Dimension(581, 231));
			readLocalXml();
		}
		return jScrollPane7;
	}

	private JTabbedPane getJTabbedPane3() {
		if(jTabbedPane3 == null) {
			jTabbedPane3 = new JTabbedPane();
			jTabbedPane3.setBounds(12, 191, 697, 267);
			jTabbedPane3.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null));
			{
				jPanelBeforeGatewayLink = new JPanel();
				jTabbedPane3.addTab("Before Link events console", null, jPanelBeforeGatewayLink, null);
				jTabbedPane3.addTab("Before Gateway status", null, getJScrollPane8(), null);
				jPanelBeforeGatewayLink.setBounds(6, 205, 697, 256);
				{
					jScrollPane6 = new JScrollPane();
					jPanelBeforeGatewayLink.add(jScrollPane6);
					jScrollPane6.setPreferredSize(new java.awt.Dimension(697, 228));
					{
						jConsoleEventiBeforeGatewayLink = new JTextArea();
						jScrollPane6.setViewportView(getJConsoleEventiBeforeGatewayLink());
						jConsoleEventiBeforeGatewayLink.setPreferredSize(new java.awt.Dimension(850, 9535));
					}
				}
			}
		}
		return jTabbedPane3;
	}

	public JScrollPane getJScrollPane8() {
		if(jScrollPane8 == null) {
			jScrollPane8 = new JScrollPane();
			readBeforeXml();
		}
		return jScrollPane8;
	}

	private JTabbedPane getJTabbedPane4() {
		if(jTabbedPane4 == null) {
			jTabbedPane4 = new JTabbedPane();
			jTabbedPane4.setBounds(12, 191, 697, 267);
			jTabbedPane4.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null));
			jTabbedPane4.addTab("After Link events console", null, getJPanel9(), null);
			jTabbedPane4.addTab("After Gateway status", null, getJScrollPane9(), null);
		}
		return jTabbedPane4;
	}

	public JScrollPane getJScrollPane9() {
		if(jScrollPane9 == null) {
			jScrollPane9 = new JScrollPane();
			readAfterXml();
		}
		return jScrollPane9;
	}
	
	private JPanel getJPanel9() {
		if(jPanel9 == null) {
			jPanel9 = new JPanel();
			{
				jScrollPane5 = new JScrollPane();
				jPanel9.add(jScrollPane5);
				jPanel9.setBounds(6, 205, 697, 256);
				jPanel9.setPreferredSize(new java.awt.Dimension(697, 256));
				jScrollPane5.setPreferredSize(new java.awt.Dimension(697, 228));
				{
					jConsoleEventiAfterGatewayLink = new JTextArea();
					jScrollPane5.setViewportView(getJConsoleEventiAfterGatewayLink());
					jConsoleEventiAfterGatewayLink.setPreferredSize(new java.awt.Dimension(850, 9535));
				}
			}
		}
		return jPanel9;
	}

}
